You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joerg Schaible (JIRA)" <ji...@codehaus.org> on 2006/05/26 14:25:40 UTC

[jira] Created: (MNG-2323) Locked SNAPSHOT version ignored

Locked SNAPSHOT version ignored
-------------------------------

         Key: MNG-2323
         URL: http://jira.codehaus.org/browse/MNG-2323
     Project: Maven 2
        Type: Bug

  Components: Dependencies  
    Versions: 2.0.4    
    Reporter: Joerg Schaible
    Priority: Critical


We use for our tip revision (head revision of a branch) a snapshot version in the form of:

_major.minor-SNAPSHOT_

If we make a (maintenance) release, we create a version like:

_major.minor.revision_

We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from

{code:xml}
<dependency>
  <groupId>group</group>
  <artifactId>artifact</artifactId>
<dependency>
{code}

to 

{code:xml}
<dependency>
  <groupId>group</group>
  <artifactId>artifact</artifactId>
  <version>major.minor-SNAPSHOT</version>
<dependency>
{code}

Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):

{noformat}
[INFO] [eclipse:eclipse]
[DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
{noformat}

But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:

{code:xml}
<dependency>
  <groupId>group</group>
  <artifactId>artifact</artifactId>
  <version>[major.minor-SNAPSHOT]</version>
<dependency>
{code}

Output from the example:

{noformat}
[INFO] [eclipse:eclipse]
[DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
{noformat}

First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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] Updated: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-2323:
-----------------------------------

    Fix Version/s:     (was: 3.0-alpha-7)

> Locked SNAPSHOT version ignored
> -------------------------------
>
>                 Key: MNG-2323
>                 URL: http://jira.codehaus.org/browse/MNG-2323
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4, 3.0-alpha-7
>            Reporter: Joerg Schaible
>            Priority: Critical
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2323?page=comments#action_65923 ] 

Joerg Schaible commented on MNG-2323:
-------------------------------------

Even more worse: version 1.99 is also preferred!

{noformat}
[INFO] [eclipse:eclipse]
[DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
[INFO] snapshot com.elsagsolutions.commons:es_commons_test:2.0-SNAPSHOT: checking for updates from central
[DEBUG] repository metadata for: 'snapshot com.elsagsolutions.commons:es_commons_test:2.0-SNAPSHOT' could not be found on repository: central
[DEBUG] Skipping disabled repository elsag-repo-release
[INFO] snapshot com.elsagsolutions.commons:es_commons_test:2.0-SNAPSHOT: checking for updates from elsag-repo-snapshot
[DEBUG] es_commons_test: using locally installed snapshot
[DEBUG] Retrieving parent-POM: com.elsagsolutions.commons:es_commons_test_master::2.0-SNAPSHOT for project: null:es_commons_test:jar:2.0-SNAPSHOT from the repository.
[INFO] snapshot com.elsagsolutions.commons:es_commons_test_master:2.0-SNAPSHOT: checking for updates from central
[DEBUG] repository metadata for: 'snapshot com.elsagsolutions.commons:es_commons_test_master:2.0-SNAPSHOT' could not be found on repository: central
[DEBUG] Skipping disabled repository elsag-repo-release
[INFO] snapshot com.elsagsolutions.commons:es_commons_test_master:2.0-SNAPSHOT: checking for updates from elsag-repo-snapshot
[DEBUG] es_commons_test_master: using locally installed snapshot
[DEBUG] Retrieving parent-POM: com.elsagsolutions.maven:master::SNAPSHOT for project: com.elsagsolutions.commons:es_commons_test_master:pom:2.0-SNAPSHOT from the repository.
[DEBUG] master: using locally installed snapshot
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 1.99;applying scope: test)
[DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:1.99:test (selected for test)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
[DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
{noformat}

> Locked SNAPSHOT version ignored
> -------------------------------
>
>          Key: MNG-2323
>          URL: http://jira.codehaus.org/browse/MNG-2323
>      Project: Maven 2
>         Type: Bug

>   Components: Dependencies
>     Versions: 2.0.4
>     Reporter: Joerg Schaible
>     Priority: Critical

>
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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] Updated: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2323?page=all ]

John Casey updated MNG-2323:
----------------------------

    Fix Version: 2.1

> Locked SNAPSHOT version ignored
> -------------------------------
>
>          Key: MNG-2323
>          URL: http://jira.codehaus.org/browse/MNG-2323
>      Project: Maven 2
>         Type: Bug

>   Components: Dependencies
>     Versions: 2.0.4
>     Reporter: Joerg Schaible
>     Priority: Critical
>      Fix For: 2.1

>
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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] Closed: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joerg Schaible closed MNG-2323.
-------------------------------

    Resolution: Cannot Reproduce

This bug has been reported for Maven 2.0.4. The primary issue that 2.0.1 is preferred over 2.0-SNAPSHOT was caused by wrong assumptions about the Maven depednency resoluation and is invalid. The last comment about 1.99 preferred over 2.0-SNAPSHOT might no longer apply, there had been a lot of changes over the last 3 years.

> Locked SNAPSHOT version ignored
> -------------------------------
>
>                 Key: MNG-2323
>                 URL: http://jira.codehaus.org/browse/MNG-2323
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4, 3.0-alpha-7
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 3.0-alpha-7
>
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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] Updated: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-2323:
-------------------------------

    Fix Version/s:     (was: 3.x)
                   3.0-alpha-7

> Locked SNAPSHOT version ignored
> -------------------------------
>
>                 Key: MNG-2323
>                 URL: http://jira.codehaus.org/browse/MNG-2323
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4, 3.0-alpha-7
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 3.0-alpha-7
>
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

-- 
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] Updated: (MNG-2323) Locked SNAPSHOT version ignored

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-2323:
-------------------------------

    Affects Version/s: 3.0-alpha-7

> Locked SNAPSHOT version ignored
> -------------------------------
>
>                 Key: MNG-2323
>                 URL: http://jira.codehaus.org/browse/MNG-2323
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4, 3.0-alpha-7
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 3.x
>
>
> We use for our tip revision (head revision of a branch) a snapshot version in the form of:
> _major.minor-SNAPSHOT_
> If we make a (maintenance) release, we create a version like:
> _major.minor.revision_
> We manage our dependencies in a dependencyManagement section of a super POM, where we define always the last released version of an artifact. A dependency of an artifact that is always declared without explicit version unless it makes usage of an unreleased version, then the child POM will be changed from
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
> <dependency>
> {code}
> to 
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>major.minor-SNAPSHOT</version>
> <dependency>
> {code}
> Unfortunately this does not work, Maven still prefers the released version. Here in the example 2.0.0 instead of 2.0.-SNAPSHOT (snippet):
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> But it gets worse. Even if we try to lock the version in the child POM, it does not work; the locked version is happily ignored:
> {code:xml}
> <dependency>
>   <groupId>group</group>
>   <artifactId>artifact</artifactId>
>   <version>[major.minor-SNAPSHOT]</version>
> <dependency>
> {code}
> Output from the example:
> {noformat}
> [INFO] [eclipse:eclipse]
> [DEBUG] com.elsagsolutions.projects.components:es_logging:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (setting version to: 2.0-SNAPSHOT from range: [2.0-SNAPSHOT,2.0-SNAPSHOT])
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0-SNAPSHOT:test (applying version: 2.0.0;applying scope: test)
> [DEBUG]   com.elsagsolutions.commons:es_commons_test:jar:2.0.0:test (selected for test)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (applying version: 2.1_3;)
> [DEBUG]     cglib:cglib-nodep:jar:2.1_3:test (selected for test)
> {noformat}
> First problem is, that 2.0.x is treated as nearer as 2.0-SNAPSHOT. This is IMHO wrong. The algorithm should look, at which point in the version numbering the SNAPSHOT part starts and ignore the further numbers in the version of released artifacts. Additionally the locked version must be honored in any case.

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