[ https://issues.apache.org/jira/browse/MNG-6482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673555#comment-16673555 ]
Karl Heinz Marbaise commented on MNG-6482: ------------------------------------------ Can you please format the question otherwise it's really hard to read > Artifactory returns oldest snapshot instead of newest > ----------------------------------------------------- > > Key: MNG-6482 > URL: https://issues.apache.org/jira/browse/MNG-6482 > Project: Maven > Issue Type: Bug > Reporter: Chandan > Priority: Major > > Artifactory returns oldest snapshot instead of newest > When repoA is built locally, it is not using the latest snapshot of repoB. It > uses the SNAPSHOT which was downloaded the first time. This is the case even > when repoA is built using -U maven flag: mvn -U clean install. > The repoB SNAPSHOT is uploaded in the artifactory, but maven is not > downloading the latest SNAPSHOT to the local repository. > Steps tried to resolve the issue: > 1) Used -U to build repoA locally, which should force maven to check the > availability of latest snapshot. RESULT: Only the > maven-metadata-snapshots-local.xml is updated but the SNAPSHOT is not > downloaded. > 2) executed rm -rf ~/.m2/repository/repoB/repoB/ to delete the local > repository which contains the repoB SNAPSHOT.RESULT: When repoA code is built > locally, maven is downloading the lastest SNAPSHOT of repoB. > 3)Added <updatePolicy> to both the build profiles present in repoA code > pom.xml file.*For intergration > profile*<repositories><repository><id>int-repository-internal</id><url>http://maven.repoB.net/repository/internal</url><releases><enabled>true</enabled><updatePolicy>never</updatePolicy><checksumPolicy>warn</checksumPolicy></releases><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy><checksumPolicy>warn</checksumPolicy></snapshots></repository></repositories> > For wombat build > profile<repositories><repository><id>wombat-repository-internal</id><url>http://maven.repoB.net/repository/internal</url><releases><enabled>true</enabled><updatePolicy>never</updatePolicy><checksumPolicy>warn</checksumPolicy></releases><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy><checksumPolicy>warn</checksumPolicy></snapshots></repository></repositories>No > luck. > 4)Used <updatePolicy> in repository id=snapshots-local in <repositories> > section by changing the > following.<repository><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy><checksumPolicy>warn</checksumPolicy></snapshots><id>snapshots-local</id><name>libs-snapshot</name><url>http://artifactory.devaws.repoB.net/artifactory/libs-snapshot-local</url></repository>No > luck. > 5)Used <updatePolicy> in settings.xml by adding the > following<repositories><repository><id>local-repo</id><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy><checksumPolicy>warn</checksumPolicy></snapshots></repository></repositories> > No luck. -- This message was sent by Atlassian JIRA (v7.6.3#76005)