You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rajib D <Ra...@igindex.co.uk> on 2009/09/30 16:57:05 UTC

Unexpected results from versions-maven-plugin:1.0:use-latest-versions

Hi All,

I've 2 queries in regard to the usage of
versions-maven-plugin:1.0:use-latest-versions.

QUERY 1
------------
I was trying to use the maven version plugin to get the various latest
(released or snapshot) versions of a project from our Nexus. However the
version plugin doesn't seem to return the results I was expecting. Can
someone please confirm whether and what it is doing is correct or not?

First when I ran:
--------------------------------------------------------
mvn org.codehaus.mojo:versions-maven-plugin:1.0:use-latest-versions
-Dincludes=com.dzango.addresslookup:addresslookup-jaxb
--------------------------------------------------------

The version in my local pom file was "7.37.0-SNAPSHOT". The above command
returned "7.37.0" from nexus. This is correct behaviour as from the 2 nexus
repository listing below, one can see that the last released version in
nexus is "7.37.0".

However when I run:
--------------------------------------------------------
mvn org.codehaus.mojo:versions-maven-plugin:1.0:use-latest-versions
-Dincludes=com.dzango.addresslookup:addresslookup-jaxb -DallowSnapshots=true
--------------------------------------------------------

Again the version in my local pom file was "7.37.0-SNAPSHOT". The command
again returns "7.37.0" from nexus. This is NOT what I was expecting. As I've
mentioned "-DallowSnapshots=true" in the command, it should have returned me
the latest snapshot version NOT the released version.

Similary when I ran the above command but with the version in my local pom
file being "7.26.1-SNAPSHOT" it again returned me "7.37.0". Again INCORRECT.
I was expecting the latest SNAPSHOT version.

Any idea what's going on or what I'm missing?
 

----------------- My RELEASE repository ------------
<metadata>
<groupId>com.dzango.addresslookup</groupId>
<artifactId>addresslookup-jaxb</artifactId>
<version>7.26.0</version>
−
<versioning>
−
<versions>
       <version>7.26.0</version>
       <version>7.27.0</version>
       <version>7.27.1</version>
       <version>7.28.0</version>
       <version>7.29.0</version>
       <version>7.29.1</version>
       <version>7.29.2</version>
       <version>7.30.0</version>
       <version>7.30.1</version>
       <version>7.30.2</version>
       <version>7.31.0</version>
       <version>7.34.0</version>
       <version>7.34.1</version>
       <version>7.34.2</version>
       <version>7.34.3</version>
       <version>7.35.0</version>
       <version>7.35.1</version>
       <version>7.36.0</version>
       <version>7.37.0</version>
</versions>
<lastUpdated>20090924132030</lastUpdated>
</versioning>
</metadata>


----------------- My SNAPSHOT repository ------------

<metadata>
<groupId>com.dzango.addresslookup</groupId>
<artifactId>addresslookup-jaxb</artifactId>
<versioning>
<latest>7.37.1-SNAPSHOT</latest>
<versions>
       <version>7.30.3-SNAPSHOT</version>
       <version>7.27.2-SNAPSHOT</version>
       <version>7.26.1-SNAPSHOT</version>
       <version>7.36.1-SNAPSHOT</version>
       <version>7.32.0-SNAPSHOT</version>
       <version>7.28.1-SNAPSHOT</version>
       <version>7.31.1-SNAPSHOT</version>
       <version>7.29.3-SNAPSHOT</version>
       <version>7.33.0-SNAPSHOT</version>
       <version>7.35.2-SNAPSHOT</version>
       <version>7.37.0-SNAPSHOT</version>
       <version>7.34.4-SNAPSHOT</version>
       <version>7.38.0-SNAPSHOT</version>
       <version>7.37.1-SNAPSHOT</version>
</versions>
<lastUpdated>20090924132147</lastUpdated>
</versioning>
</metadata>

**************************************

QUERY 2
------------------

My second query is about the latest version shown in the above SNAPSHOT
repositories meta data. 

Why is the latest version shown as "7.37.1-SNAPSHOT" while the latest
version we actually have is "7.38.0-SNAPSHOT"?
 
However point to be noted here is that update time for "7.37.1-SNAPSHOT" is
later to "7.38.0-SNAPSHOT". If the update timestamp decides the latest
version, then is there any way to ask the plugin to overlook that and go for
the version which has the highest number against it and return than?


-- 
View this message in context: http://www.nabble.com/Unexpected-results-from-versions-maven-plugin%3A1.0%3Ause-latest-versions-tp25682772p25682772.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org