Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Pulling dependencies from ProGet in gradle
-
I'm trying to use my maven feed on ProGet on gradle for dependency resolution. My feed has connectors for remote repos such has maven central, gradle plugins, etc.
My problem now is that whenever I'm building my project I get the error for a couple dependencies but this is one example
Could not find hamcrest-core-1.3.jar (org.hamcrest:hamcrest-core:1.3). Searched in the following locations: http://my.server.local:8624/maven2/my-feed/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
When I check the feed it has the artifacts but when I click on the jar files it gives me a page.
This doesn't make sense since I'm using the maven central repo. Would I need to download each artifact manually from the maven central repo?
I feel like I'm missing something or fetching the feed wrong.
-
The "File not found on disk" message means that the file was indexed in the database but it's not on disk. This can happen when files are directly deleted from the packagestore, removed by a quarantine tool, disk paths changed (common on Docker, if you mount wrong directory), etc.
Hopefully that makes sense and will help you troubleshoot from here. You can try to clear the cached files, run a feed-reindex, etc. But if all of your files are missing then that's probably not what you want to do.
Thanks,
Alana
-
@atripp So I have been testing other dependencies and it's giving the same result. For example, I'm trying to pull this dependency
I noticed that it only downloads the .pom file. The other artifacts show up but when I click on the .jar it still says File not found on disk. The weird thing is when I delete the .pom artifact only then I can click on the .jar since it can be found now.
I have tried clearing cache and also re-indexing but it always does this. This only happens when I use connectors. Whether it be a remote repo connector or a connector a proget feed. I also made sure the global settings allow invalid version/non standard files to be deployed to the feed. I also set the block settings to allow download for noncompliant packages.
Is there anything else I can try to resolve this?
-
I'm not really sure, but I'll explain how things work so it might help troubleshoot.
First, the Maven API does not provide a file listing. While you (as a user) can often "see" via an HTML page (like this listing at jboss.org), it's simply not available for listing in the API. The only required file in an artifact is the
.pom
file, so when you "pull" an artifact to ProGet, that's all you'll get.Next, the "remote" icons next to the files indicate that they were cached (i.e. added to the feed) via a connector. That means the files were successfully written to disk, recorded in the database... but now they are gone. Hence, why you keep getting the "file not found" message.
The most likely culprit for this is something deleting the files from a packagestore. We often see security tools doing that for "safety" reasons, since they are
.jar
files that may be dangerous I guess.Overall, the maven API is a very simple series of GETs. So perhaps, you can just experiment with this? First, start with a brand new feed and a connector.
Then, run the command:;
curl http://my.server.local:8624/maven2/my-new-feed/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar --output hamcrest-core-1.3.jar
You should see the file download via CURL. Afterwards, you should see the artifact as a cached package (Top Navigation > Packages > Select Cached). You should also see that
.jar
file on disk, written to the package store location (Manage Feed > Storage).If you don't see a .jar file downloaded to that location on disk, then it means something is "blocking" the file being written. If it's there, then it means something is deleting it after.
Thanks,
Alana