[ 
http://jira.codehaus.org/browse/MVERSIONS-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=239750#action_239750
 ] 

Jane Young commented on MVERSIONS-119:
--------------------------------------

Not sure if I can provide you a specific file to reproduce this since it 
requires setting up an Nexus/http server to host a Maven repo.  But here are 
the steps I did:

1.  setup an apache server or Nexus that host a Maven repository.

2.  deploy 3 test artifacts with the versions as:   "3.0.1", "3.0.1-1", 
"3.0.1-1.1" and groupId as:  "test.mercury.version" and artifact as: "foobar" 

3.  Create a rule-set.xml file:
<ruleset comparisonMethod="maven">
<rules>
<rule groupId="test.mercury.version" artifactId="foobar" 
comparisonMethod="mercury"/>
</rules>
</ruleset>
and publish the rule-set.xml to the http/Nexus server.
e.g.
"http://admininfra.sfbay.sun.com:8080/maven/mercury-version-rules.xml";

4.  In a pom.xml, set the dependency as:
<dependency>
<groupId>test.mercury.version</groupId>
<artifactId>foobar</artifactId>
<version>3.0.1</version>
</dependency>

Don't forget to reference the repository to the one that was created in Step 1.

For example, here's the pom.xml file I have:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";> 
    <modelVersion>4.0.0</modelVersion>
    <groupId>maven.test</groupId>
    <artifactId>mercury-dependency-test</artifactId>
    <version>1.0</version>
    <name>MercuryDependency</name>

    <repositories>
        <repository>
            <id>test-repo</id>
            <name>Repo to test Mercury version</name>
            <url>http://admininfra.sfbay.sun.com:8080/maven/release</url>
            <snapshots>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>test.mercury.version</groupId>
            <artifactId>foobar</artifactId>
            <version>3.0.1</version>
        </dependency>
    </dependencies>
</project>

5. Now execute  "mvn -DrulesUri=http://host/rule-set.xml 
versions-maven-plugin:use-latest-releases".  In my case, rulesUri is  
"http://admininfra.sfbay.sun.com:8080/maven/mercury-version-rules.xml";

6.  I expect the pom file to have the dependency updated to 3.0.1-1.1 instead 
it's updated with the version 3.0.1-1.



> v-m-p:use-latest-releases does not update pom.xml to the latest mercury 
> version
> -------------------------------------------------------------------------------
>
>                 Key: MVERSIONS-119
>                 URL: http://jira.codehaus.org/browse/MVERSIONS-119
>             Project: Maven 2.x Versions Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Mac/Unix
>            Reporter: Jane Young
>            Priority: Critical
>
> I'm using Maven 2.2.1 and versions-maven-plugin:1.2 with mercury versioning 
> rule.
> The artifact versions in the maven repo are:  3.0.1, 3.0.1-1, 3.0.1-1.1
> In maven versioning:  3.0.1<3.0.1-1 and 3.0.1-1.1<3.0.1 and  3.0.1-1.1<3.0.1-1
> In mercury versioning:  3.0.1<3.0.1-1 and 3.0.1-1.1 > 3.0.1 and 3.0.1-1.1 > 
> 3.0.1-1
> I'd like to use mercury versioning rule, so I created a rule-set xml file:
> <ruleset comparisonMethod="maven">
>  <rules>
>     <rule groupId="my.gropuId" artifactId="my.artifact"  
> comparisonMethod="mercury"/>
>  </rules>
> </ruleset>
> In my pom.xml file, the dependency is defined as:
>       <dependency>
>           <groupId>my.groupId</groupId>
>           <artifactId>my.artifact</artifactId>
>           <version>3.0.1</version>
>       </dependency>
> I use v-m-p:use-latest-releases goal with -DrulesUri=http://host/rule-set.xml 
> to update the pom with the latest release.  I expect the pom is updated with 
> 3.0.1-1.1 instead it's updated with the version 3.0.1-1.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to