Maven only replaces SNAPSHOTS with the latest version

So I am using maven 3.0.5 and am trying to replace all -SNAPSHOTS in the project with the equivalent of the latest LATEST version. Before anyone point me to the maven plugin versions and the matrix:

http://mojo.codehaus.org/versions-maven-plugin/examples/advancing-dependency-versions.html

Let me add that I have looked through it and so far have not been able to get the versions plugin to ignore the SNAPSHOT dependencies. According to the matrix in the link above, the purpose of using the latest versions should be exactly what I want, however when I run:

mvn versions: use-latest-releases

All dependencies, including release versions, are updated to the latest. This is not what I want and I cannot find a way to filter the release versions from the upgrade candidate list.

I also tried to configure plugin versions to include only artifacts with -SNAPSHOT in their versions:

 <plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>versions-maven-plugin</artifactId>
   <version>2.1</version>
       <configuration>
           <includesList>*:*:*:*:0-SNAPSHOT</includesList>
       </configuration>
 </plugin>

      

Please note that for all snapshots with version "0-SNAPSHOTS" we are implementing a modified version of the release process described at http://axelfontaine.com/blog/maven-releases-steroids.html for our releases.

Also, I would like to do the same with the version numbers stored in properties, basically using:

mvn versions: update-properties

I would like to ignore all release versions and only target -SNAPSHOT versions to upgrade.

+3


source to share





All Articles