Maven replace only SNAPSHOTS with latest version

837 views Asked by At

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

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

let me add that I have looked into it and so far have not been able to get the versions plugin to ignore non SNAPSHOT dependencies. According to the matrix in the above link the use-latest-releases goal should be exactly what I want, however when I run:

mvn versions:use-latest-releases

All dependencies including release versions are incremented to the latest. This is not what I want and I cannot seem to find a way to filter out the release versions from the list of update candidates.

I've also attempted to configure the versions plugin to include only artifacts with -SNAPSHOT in their versions like so:

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

Note that all snapshots are versioned "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.

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

mvn versions:update-properties

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

0

There are 0 answers