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.

    Screenshot 2025-05-15 at 3.08.55 PM.png

    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?

    Screenshot 2025-05-15 at 3.04.21 PM.png

    I feel like I'm missing something or fetching the feed wrong.


    Log in to reply
     

  • inedo-engineer

    Hi @misael-esperanzate_5668 ,

    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 Screenshot 2025-06-06 at 11.54.41 AM.png

    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?


  • inedo-engineer

    Hi @misael-esperanzate_5668 ,

    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



  • @atripp said in Pulling dependencies from ProGet in gradle:

    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.

    Hi,
    Strange. I thought that this "Antena" Icon is a indicator that file was indexed (weekly Indexer) and not present on repository and you have to manually or remotely download artifact to "remove" this icon.

    2c4f88eb-0a7f-41e7-b865-5448a2c4e3ff-image.png

    And after that:

    ffb62a1e-90da-47a9-bc79-358db571699b-image.png

    Then, you can delete file from repository using "X" on the right.

    It "becomes" Remote again.

    2ce05d61-c57f-4f79-8ac6-17f64fc74f0d-image.png

    Notice how "Published" date changes.

    Files on disk:

    933c8858-0682-4f06-9abe-2772b09af058-image.png

    Cheers,
    Michal


  • inedo-engineer

    @michal-roszak_0767 just a heads up we're a bit slammed with ProGet 2025 release but will respond soon!


  • inedo-engineer

    Hi @michal-roszak_0767,

    That icon indicates it's a remote package. That means it can be remote or cached. If you use the Pull to ProGet feature, then it will pull all the files locally and converts them to an internal/local package and those icons go away. If you combine that icon with the error "File not found on disk", this means the artifact was cached, but something deleted the file from disk. That is what Dean was trying to explain.

    @misael-esperanzate_5668,

    I think the next step from here is to navigate to Manage Feed -> Storage & Retention, and then run the re-index feed job (found to the right of storage) with the "Remove database entries for missing package files" option selected. That will remove any Maven artifacts from the database that are missing local files and allow them to be re-cached again. If you want to review the Maven artifacts that would be removed, run the re-index without selecting the remove database entries option. This will warn you of any Maven artifacts that a missing first, then you can run it again to remove them. Hope this helps!

    Thanks,
    Dan



  • @Dan_Woolf Hmm so I tried re-indexing the feed and the debug showed that there were no orphaned packages. When I try to build my package with gradle it still says it could not find the .jar files. When I check proget to see if it caches it I see that it manages to fetch the .pom but not the .jar.

    The strange thing is when I use the curl command for example,
    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 to check if it's available I get a 404 not found error. But when I delete the .pom making remote icon show up again, running that same command makes the .jar available?


  • inedo-engineer

    Hi @misael-esperanzate_7550,

    What version of ProGet do you have installed? This may be an issue that we have already fixed. I remember this happening in some older versions of ProGet.

    Thanks,
    Dan


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation