0 Replies Latest reply on Aug 14, 2014 10:50 AM by binodpanta

    Nexus metadata does not update when requesting artifacts via  shrinkwrap, but does if I use Maven with a pom

    binodpanta

      simply put

       

      I have a repository, then I have a Nexus repository that has a proxy to it.

       

      http://originalRepo <--- 'proxy' type repo in Nexus that points to it

       

       

      When I publish a new release of a release artifacts to originalRepo it shows up there immediately. But it does not appear in Nexus 'proxy' repo yet (via the browser). I guess this is expected

       

       

      Now I ask for that new release via mvn package by adding the dep to the pom, it works.

       

      If I instead 'ask for that new release' with an api resolve("g:a:[versionRange]) calls (or resolveLatestVersion()) using the ShrinkWrap api, it does not find the latest version. Digging into it, I noted it is because the metadata.xml does not update in the nexus 'proxy' repository. Unless I 'expire cache' manually.

       

      Is there a difference in how 'mvn' is asking for the dependencies vs ShrinkWrap, such that only the former is forcing the 'proxy' to update its metadata?

       

      This is causing problems for me since my users deploy to 'originalRepo' and expxect their new releases to be instantly available via the ShrinkWrap layer which is querying only the proxy repo.

       

      Ideas?

       

       

      Nexus version: 1.9.2

      ShrinkWrap version: 2.1.1

       

       

      Thanks