You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Bittner (JIRA)" <ji...@codehaus.org> on 2011/05/02 11:13:22 UTC

[jira] Created: (MRELEASE-678) Release with Maven 3.0.3 and Ranges: Referencing Snapshot-Versions

Release with Maven 3.0.3 and Ranges: Referencing Snapshot-Versions
------------------------------------------------------------------

                 Key: MRELEASE-678
                 URL: http://jira.codehaus.org/browse/MRELEASE-678
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: perform
    Affects Versions: 2.1
         Environment: Maven 3.0.3, java-6-sun 1.6.0_24, RHEL5
            Reporter: Christian Bittner


In the POM of the to be released project we reference dependencies by range as follows:

      <dependency>
        <groupId>sample</groupId>
        <artifactId>XYZ</artifactId>
        <version>[7.4.0, 7.4.9999]</version>
      </dependency>

Since the last Version of XYZ is a snapshot the maven-compiler-plugin classpath in the perform phase references this snapshot (Maven 3.0.3):

[INFO] [DEBUG]   (f) classpathElements = [/opt/mvn/hudson/workspace/RangeB/target/checkout/target/classes, /opt/mvn/.m2/repository/sample/XYZ/7.4.4-SNAPSHOT/XYZ-7.4.4-SNAPSHOT.jar, /opt/mvn/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar, /opt/mvn/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar, 
...

Snapshots MUST not be referenced in releases. The last released version 7.4.3 of XYZ must be referenced instead.

Note: We know that this effect is caused by the broken range concept of maven. Nevertheless the release plugin seems to be the right plugin to report this, since releasing is senseless when it does not work properly.




-- 
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

        

[jira] Commented: (MRELEASE-678) Release with Maven 3.0.3 and Ranges: Referencing Snapshot-Versions

Posted by "Christian Bittner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=266164#action_266164 ] 

Christian Bittner commented on MRELEASE-678:
--------------------------------------------

Please note, that a "prepare-with-pom" breaks the build, when a snapshot is referenced by a range. For instance:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:01.764s
[INFO] Finished at: Tue May 10 11:16:58 CEST 2011
[INFO] Final Memory: 6M/122M 
[INFO] ------------------------------------------------------------------------ 
maven builder waiting
mavenExecutionResult exceptions not empty org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare-with-pom (default-cli) on project RangeProjectB: Can't release project due to non released dependencies : local:XYZ:jar:7.4.4-SNAPSHOT:compile in project 'RangeProjectB' (de.lvm.range.b:RangeProjectB:jar:2.0.5-SNAPSHOT) 

Of course this doesn't solve the problem. A snapshot must not be referenced in a release context via ranges. Nevertheless: IMHO a "prepare" and a "prepare-with-pom" should work consistently, i.e. a "prepare" must break the build too !!!



> Release with Maven 3.0.3 and Ranges: Referencing Snapshot-Versions
> ------------------------------------------------------------------
>
>                 Key: MRELEASE-678
>                 URL: http://jira.codehaus.org/browse/MRELEASE-678
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: perform
>    Affects Versions: 2.1
>         Environment: Maven 3.0.3, java-6-sun 1.6.0_24, RHEL5
>            Reporter: Christian Bittner
>
> In the POM of the to be released project we reference dependencies by range as follows:
>       <dependency>
>         <groupId>sample</groupId>
>         <artifactId>XYZ</artifactId>
>         <version>[7.4.0, 7.4.9999]</version>
>       </dependency>
> Since the last Version of XYZ is a snapshot the maven-compiler-plugin classpath in the perform phase references this snapshot (Maven 3.0.3):
> [INFO] [DEBUG]   (f) classpathElements = [/opt/mvn/hudson/workspace/RangeB/target/checkout/target/classes, /opt/mvn/.m2/repository/sample/XYZ/7.4.4-SNAPSHOT/XYZ-7.4.4-SNAPSHOT.jar, /opt/mvn/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar, /opt/mvn/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar, 
> ...
> Snapshots MUST not be referenced in releases. The last released version 7.4.3 of XYZ must be referenced instead.
> Note: We know that this effect is caused by the broken range concept of maven. Nevertheless the release plugin seems to be the right plugin to report this, since releasing is senseless when it does not work properly.

-- 
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