You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brian Kramer (JIRA)" <ji...@codehaus.org> on 2010/08/05 13:48:32 UTC

[jira] Created: (MNG-4751) Snapshot version not resolved

Snapshot version not resolved
-----------------------------

                 Key: MNG-4751
                 URL: http://jira.codehaus.org/browse/MNG-4751
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 3.0-beta-1
         Environment: linux x86_64, sun java 1.6.0_14
            Reporter: Brian Kramer
            Priority: Blocker
         Attachments: snapshot_dep.zip

Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.

This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.

This is a regression from 2.2.1

To reproduce:
1. Release/deploy/install v1.0 of tlib
2. deploy v1.1-SNAPSHOT of tlib
3. Release/deploy/install v1.0 of tlib2
4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

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

Benjamin Bentmann updated MNG-4751:
-----------------------------------

    Summary: Snapshot version not resolved for version range  (was: Snapshot version not resolved)

> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234544#action_234544 ] 

Herve Boutemy commented on MNG-4751:
------------------------------------

please have a look at http://docs.codehaus.org/display/MAVENUSER/SNAPSHOT+Resolution

if the use case given by Brian is correct, we should transform it as a maven-aether-provider unit test and work on a fix (doing a fork of Maven in github should be ok to have everybody make personal tests)

> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231114#action_231114 ] 

Mark Derricutt commented on MNG-4751:
-------------------------------------

This now seems to be affecting IntelliJ IDEA as well ( at least I suspect this might be the reason ), as the IDE's maven support now resolves all project artifacts to the released version, rather than the -SNAPSHOT version in the opened project, which means you get the annoying behavior of single stepping into, and breakpoints stopping on .class entries from a jar file rather than the .java file in our source paths.

As mentioned in MNG-3092 - I love this feature -FOR RELEASES- where I wholeheartedly only want to resolve released artifacts so that any API breakages are caught that otherwise might leak in without a proper version bump ( 1.2.4 -> 1.3.1 for instance ) - but for integration tests, distribution builds, and IDE integration I think having the old behavior is preferred.

Off by default would be fine by me, as long as I can enable it for projects that explicitly say "give me the bleeding edge", possibly via a POM element ( schema breaking tho ), a plugin configuration, or just a system property that one needs to set.

I was pointed at http://youtrack.jetbrains.net/issue/IDEA-25146 yesterday (IntelliJ bug report) for some maven resolution oddities which I commented on about this range issue, however they may or may not be related.


> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

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

Benjamin Bentmann closed MNG-4751.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-4
         Assignee: Benjamin Bentmann

Fixed in [r997380|http://svn.apache.org/viewvc?view=revision&revision=997380] by reverting the change for MNG-3092 until a more robust solution is designed.

> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Assignee: Benjamin Bentmann
>            Priority: Blocker
>             Fix For: 3.0-beta-4
>
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved

Posted by "Brian Kramer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231031#action_231031 ] 

Brian Kramer commented on MNG-4751:
-----------------------------------

I found a workaround, I'm not sure that this is the intended behavior but if you make the snapshot a single inclusive range then it works.

in tapp/pom.xml:
    <dependency>
      <groupId>org.tlib</groupId>
      <artifactId>tlib</artifactId>
      <version>[1.1-SNAPSHOT]</version>
    </dependency>


> Snapshot version not resolved
> -----------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231034#action_231034 ] 

Benjamin Bentmann commented on MNG-4751:
----------------------------------------

This was an intentional change to fix MNG-3092. The new behavior is apparently as controversial as the previous one, so feel free to join the related discussion [Resolving SNAPSHOTs from Version Ranges in Maven 3|http://maven.40175.n5.nabble.com/Resolving-SNAPSHOTs-from-Version-Ranges-in-Maven-3-td2257936.html]

> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

-- 
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-4751) Snapshot version not resolved for version range

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235121#action_235121 ] 

Benjamin Bentmann commented on MNG-4751:
----------------------------------------

FYI, I sent a proposal to the dev thread [Re: snapshot range changes in m3|http://www.mail-archive.com/dev@maven.apache.org/msg85742.html], feedback appreciated.

> Snapshot version not resolved for version range
> -----------------------------------------------
>
>                 Key: MNG-4751
>                 URL: http://jira.codehaus.org/browse/MNG-4751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0-beta-1
>         Environment: linux x86_64, sun java 1.6.0_14
>            Reporter: Brian Kramer
>            Priority: Blocker
>         Attachments: snapshot_dep.zip
>
>
> Even with a snapshot dependency in the pom, a release version is included in the classpath for compilation.
> This happens when a mid-level dependency and the top-level project both depend on the same artifact.  The mid-level dependency selects a range of valid versions which includes the snapshot version and the top-level project depends explicitly on the snapshot version.
> This is a regression from 2.2.1
> To reproduce:
> 1. Release/deploy/install v1.0 of tlib
> 2. deploy v1.1-SNAPSHOT of tlib
> 3. Release/deploy/install v1.0 of tlib2
> 4. Try to compile tapp

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