Can anyone explain me if the version is specified as auto as mentioned below for the dependencies
<version>auto</version>
how does it get resolved to the latest from t开发者_C百科he maven repository?
I see that some file when mvn exectutes an temporary file called auto-pom.xml is generated where all the auto is replaced with proper latest revisions from my repository like
<version>1.0-SNAPSHOT</version>
I'm not sure what the question is exactly but Maven implements a version comparison algorithm that you can check in the sources of org.a.m.a.v.DefaultArtifactVersion.java
. Also see the Versioning wiki page for an illustration and discussion of this algorithm.
Using this algorithm, I can imagine that Maven is able to check a repository for available versions and to determine the "latest" one.
精彩评论