I'm having problems understanding how latest.integration works.
I have an example that is not giving the output mentioned in: http://ant.apache.org/ivy/history/latest-milestone/tutorial/defaultconf.html
which says, the local resolver has precedence over other resolvers, regardless of the time of publishing.
My ivysettings.xml goes like this:
<resolvers>
<chain name="download-chain" returnFirst="false" >
<url name="nexus-repo" m2compatible="true" >
<artifact pattern="${nexus}/[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]" />
<ivy pattern="${nexus}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />
</url>
<resolver ref="local" />
</chain>
</resolvers>
here I declare that I have a nexus url repository and a reference to the default local. I use this chain when I want to resolve my dependencies.
I build the designated artifact and publish it to local with status "integration" with a revision "HEAD" (something like SNAPSHOT for us), first using the local resolver:
<ivy:publish
overwrite="yes"
update="true"
artifactspattern="${project.dist.dir}/[artifact]-[revision](-[classifier]).[ext]"
resolver="local"
settingsRef="ivy.nexus"
/>
and rebuild it again and publish it to nexus repository:
<ivy:publish
overwrite="yes"
update="true"
artifactspattern="${project.dist.dir}/[artifact]-[revision](-[classifier]).[ext]"
resolver="publish-url"
forcedeliver="true"
settingsRef="ivy.nexus"
/>
I have another project that declares the previous artifact as dependency with revision "latest.integration".
I expect that the artifact should be downloaded from the local repository regardless of the order of the declared resolvers. But that's not the case. The artifact downloaded is always of the resolver mentioned first. Changing the name of the "local" resolver didn't affect anything. The order is always what matters.
I tried appending changing="true" to my dependency. It didn't help.
In this question: Ivy: Forcing local snapshot for dependency
The Asker mentions an even different behavior, namely that the very latest is picked up (the order of resolvers doesn't even matter).
SO to wrap it up and sorry for prolongation: How to get an artifact:
1) always the latest.integration (the most recent) regardless of location.
2) always from local even if there's a more recent integration version in other locations.
3) Am I that clueless?