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 Schulte (JIRA)" <ji...@codehaus.org> on 2006/04/03 23:28:44 UTC

[jira] Created: (MNG-2199) Version ranges not supported for parent artifacts

Version ranges not supported for parent artifacts
-------------------------------------------------

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

  Components: Reactor and workspace, POM, Inheritence and Interpolation  
    Versions: 2.0.3    
    Reporter: Christian Schulte


It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.

  <parent>
    <artifactId>artifactId</artifactId>
    <groupId>groupId</groupId>
    <version>[2.0, 2.0.1]</version>
  </parent>

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom

Additionally it would be great if this

  <parent>
    <artifactId>artifactId</artifactId>
    <groupId>groupId</groupId>
    <version>[2.0, ${pom.version}]</version>
  </parent>

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom

would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308736#comment-308736 ] 

Christian Schulte commented on MNG-2199:
----------------------------------------

6 years after creating this issue, I still think it would be helpful to have this supported. For example:

The server name of a repository changes.
  => All POMs of all artifacts in the repository are broken and point to a non-existing repository.
  => need to re-release all artifacts
  => new artifact versions
  => everyone must update everything
  => at least one full release-cycle wasted

One might say that this kind of problem can be avoided by not adding repositories to the POM. If you think about that, this just ends in every environmental property being moved out into settings.xml or somewhere else. That just leads to non-determinism as well.

Executing 'mvn release:prepare' on a years old tag should work without touching anything else. It would be non-determinism if this would stop working a few years later, no ?

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Todor Boev (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=190889#action_190889 ] 

Todor Boev commented on MNG-2199:
---------------------------------

I think there is an acceptable alternative: Make <relativePath>  pick up the maven coordinates of the parent pom automatically. 

Most multi-module builds form a monolithic tree of poms that is always checked out atomically. I.e. we have a specific tree layout in the file system that has <module> for forwards links and <parent> for backlinks. If <module> does not need full maven coordinates why should parent? Imagine we can use either maven coordinates or a single <relativePath> as parent:

<parent>
   <relativePath>../pom.xml</relativePath>
</parent>

Than the entire multi-module project can have a single groupId and version set in the root pom.  We would be able to control the common version of this logical set of artifacts from one file - no more need to edit dozens of <parent> clauses for every trivial change. All that is needed is for Maven to replace <relativePath> with the actual maven coordinates when we install/deploy.

For that matter why don't we make <module> accept a set of maven coordinates as well? Than both the forward and backward links would support two modes: maven coordinates and the repo or local file system and automatic maven coordinate interpolation upon install/deploy.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308736#comment-308736 ] 

Christian Schulte edited comment on MNG-2199 at 9/17/12 12:38 PM:
------------------------------------------------------------------

6 years after creating this issue, I still think it would be helpful to have this supported. For example:

The server name of a repository changes.
  => All POMs of all artifacts in the repository are broken and point to a non-existing repository.
  => need to re-release all artifacts
  => new artifact versions
  => everyone must update everything
  => at least one full release-cycle wasted

One might say that this kind of problem can be avoided by not adding repositories to the POM. If you think about that, this just ends in every environmental property being moved out into settings.xml or somewhere else. That just leads to non-determinism as well.

Executing 'mvn release:prepare' on a years old tag should work without touching anything else. It would be non-determinism if this would stop working a few years later, no ?

The version range is very important here due to the ability to declare an upper bound. I am not requesting to 'just use the latest parent' but to use the latest parent from a range (of compatible parent POMs).

During model building, if a POM contains a 'parent' element using a version range:
=>validate that range has an upper bound and fail the build if unbounded
=>load the latest parent from that range
=>validate the latest parent does not define any 'modules' - fail the build if it does (maybe use some other information to validate the POM here - a new packaging used to flag a POM to be used that way e.g.)
=>use that parent

                
      was (Author: schulte2005):
    6 years after creating this issue, I still think it would be helpful to have this supported. For example:

The server name of a repository changes.
  => All POMs of all artifacts in the repository are broken and point to a non-existing repository.
  => need to re-release all artifacts
  => new artifact versions
  => everyone must update everything
  => at least one full release-cycle wasted

One might say that this kind of problem can be avoided by not adding repositories to the POM. If you think about that, this just ends in every environmental property being moved out into settings.xml or somewhere else. That just leads to non-determinism as well.

Executing 'mvn release:prepare' on a years old tag should work without touching anything else. It would be non-determinism if this would stop working a few years later, no ?

The version range is very important here due to the ability to declare an upper bound. I am not requesting to 'just use the latest parent' but to use the latest parent from a range (of compatible parent POMs).

                  
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

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

Jason van Zyl updated MNG-2199:
-------------------------------

    Fix Version/s:     (was: Issues to be reviewed for 3.x)
                   3.1.1
    
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.1.1
>
>         Attachments: MNG-2199-3.0.4.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Dariusz Czerski (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287101#comment-287101 ] 

Dariusz Czerski commented on MNG-2199:
--------------------------------------

It would be very helpful to have a support for specifying parent artifacts version by a property.

<parent>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
<version>${pom.version}</version>
</parent>

This feature opens a possibility to create real centralized dependency management system for multi-project enviroment.
All dependency versions can be keep as parameters (with names in some convention) in special parent project.
Each project defines versions of their dependencies with such a parameters.
Something like this:

<dependency>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
<version>${artifactId.groupId.version}</version>
</dependency>

Then, just by changing value of pom.version, we can automatically change a whole calasspath of all project in the system.
It is very helpful for managing backward compatibility changes.
Of course, the parent project is subject to the normal versioning, it's version changes each time when the new version of some project appear.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199.patch

Updated patch.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2199) Version ranges not supported for parent artifacts

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

John Casey updated MNG-2199:
----------------------------

    Fix Version: 2.1

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>          Key: MNG-2199
>          URL: http://jira.codehaus.org/browse/MNG-2199
>      Project: Maven 2
>         Type: Bug

>   Components: Reactor and workspace, POM, Inheritence and Interpolation
>     Versions: 2.0.3
>     Reporter: Christian Schulte
>      Fix For: 2.1

>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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-2199) Version ranges not supported for parent artifacts

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

Mark Michaelis commented on MNG-2199:
-------------------------------------

We also need this issue to be resolved - actually MNG-624 (no version = use latest parent) is not enough from my point of view. We need this parent POM for environmental settings (where are repositories and such) which always needs to be up to date. But: We also need to build old projects with this parent POM - and to allow to refactor the property names for example some day we need to have a rule like: In each major version of the parent POM its "API" (i. e.: the property names) stay the same.

Up to now we used settings.xml for this which we handed over through the invoker-plugin. The settings.xml were downloaded and unpacked as dependency - which of course supports version ranges. But the invoker-plugin poses other problems so that it is not a solution for us anylonger.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199-3.0.4.patch

Patch for Maven 3.0.4.
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199-3.0.4.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308770#comment-308770 ] 

Christian Schulte commented on MNG-2199:
----------------------------------------

Another example. Consider I have been using a parent POM containing the following information.

{code}
<license>
  <name>GNU GENERAL PUBLIC LICENSE</name>
  <url>http://www.gnu.org/copyleft/gpl.txt</url>
  <distribution>repo</distribution>
</license>
{code}

As you may know, the content that URL points at changed from GPL 2.1 to GPL 3 a few years ago. If I want already deployed artifacts to stay at GPL 2.1, I cannot do anything about it. Releasing a new parent for all those artifacts would let me deal with this. Note that for this example I would want this feature to keep the artifacts from silently changing the referenced license text.

Not putting that URL into the POM would have avoided the situation, of course. You cannot predict the future, however.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199.patch

Initial patch adding support for the requested feature.
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308736#comment-308736 ] 

Christian Schulte edited comment on MNG-2199 at 9/17/12 11:55 AM:
------------------------------------------------------------------

6 years after creating this issue, I still think it would be helpful to have this supported. For example:

The server name of a repository changes.
  => All POMs of all artifacts in the repository are broken and point to a non-existing repository.
  => need to re-release all artifacts
  => new artifact versions
  => everyone must update everything
  => at least one full release-cycle wasted

One might say that this kind of problem can be avoided by not adding repositories to the POM. If you think about that, this just ends in every environmental property being moved out into settings.xml or somewhere else. That just leads to non-determinism as well.

Executing 'mvn release:prepare' on a years old tag should work without touching anything else. It would be non-determinism if this would stop working a few years later, no ?

The version range is very important here due to the ability to declare an upper bound. I am not requesting to 'just use the latest parent' but to use the latest parent from a range (of compatible parent POMs).

                
      was (Author: schulte2005):
    6 years after creating this issue, I still think it would be helpful to have this supported. For example:

The server name of a repository changes.
  => All POMs of all artifacts in the repository are broken and point to a non-existing repository.
  => need to re-release all artifacts
  => new artifact versions
  => everyone must update everything
  => at least one full release-cycle wasted

One might say that this kind of problem can be avoided by not adding repositories to the POM. If you think about that, this just ends in every environmental property being moved out into settings.xml or somewhere else. That just leads to non-determinism as well.

Executing 'mvn release:prepare' on a years old tag should work without touching anything else. It would be non-determinism if this would stop working a few years later, no ?

                  
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199.patch

Updated the patch one more time. This patch adds support for

{code}
<parent>
  <groupId>gid</groupId>
  <artifactId>aid</artifactId>
  <version>Maven version range syntax, e.g. [1.0, 2.0)</version>
</parent>
{code}

It will fail the build whenever a child references a parent that way without defining a version. Error message would be: 'Child POM gid:aid:[unknown-version] cannot inherit version [1.0,2.0) from parent. Must define a version explicitly.'

One thing I would want this patch to do additionally, is validation of the version ranges in use. I did not find methods at interface 'org.sonatype.aether.version.VersionRange' to allow querying for 'isBounded' / 'isUpperBounded' / 'isLowerBounded' which would be needed for this.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308872#comment-308872 ] 

Christian Schulte commented on MNG-2199:
----------------------------------------

[Super-POM History|http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml?view=log]

- [use proper CNAME|http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml?r1=1155270&r2=1160922&diff_format=h]
- [going back to assembly beta-1 as there is an important regression in assembly:attached|http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml?r1=639019&r2=639744&diff_format=h]
- [try using repo1 again to see if it avoids the 503 errors|http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml?r1=320991&r2=326009&diff_format=h]
- [change main repo until we stabilise maven.org|http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml?r1=292103&r2=320693&diff_format=h]

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302916#comment-302916 ] 

Milos Kleint commented on MNG-2199:
-----------------------------------

+ on on wontfix as well. Any non-determinism in parent coordinates makes repository content fluid which is a bad thing IMHO.
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated MNG-2199:
-------------------------------

    Issue Type: Wish  (was: Bug)

Changing issue type from "Bug" to "Wish"
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308865#comment-308865 ] 

Paul Benedict commented on MNG-2199:
------------------------------------

I don't think parent versions should act like dependency versions. The parent should be a known quantity and not subject to environmental changes.
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Sylvain MariƩ (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174999#action_174999 ] 

Sylvain MariƩ commented on MNG-2199:
------------------------------------

+1

The parent should be handled exactly the same way than other dependencies. Increasing manually all children's poms everytime a new reporting option has been set in the parent is not very handy. Same for release configuration, license handling , etc... in all these cases I would like  the children projects to just take the latest version of the parent, or range [X.X.0,X.X+1.0) for example.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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-2199) Version ranges not supported for parent artifacts

Posted by "Sander Nieuwenhuizen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138551#action_138551 ] 

Sander Nieuwenhuizen commented on MNG-2199:
-------------------------------------------

It makes no sense imho that you cannot set a version range for the parent as you can with any other (regular) dependency. I would like the option to let my artifact lift on the latest version of the parent instead of linking it strictly to a specific version of the parent.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 2.1
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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-2199) Version ranges not supported for parent artifacts

Posted by "Dmitry Katsubo (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=268326#action_268326 ] 

Dmitry Katsubo commented on MNG-2199:
-------------------------------------

This is a feature I would like to have as well. In my case I would like to see the ["imported" dependencies|http://docs.codehaus.org/display/MAVEN/Importing+Managed+Dependencies] to work with version ranges.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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-2199) Version ranges not supported for parent artifacts

Posted by "Joost den Boer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208812#action_208812 ] 

Joost den Boer commented on MNG-2199:
-------------------------------------

Don't agree with Todor. Using relative path is not a solution since lots of projects have a (company wide) parent pom but are not part of a multi-module project.
As Sylvain said version ranges would be very handy when changing release configuration, license, etc and those are exactly the kind of things you want to configure globally for all company projects. All clients I have worked for have their own main pom in which they define this kind of things. Now, when a new version of that main pom is released, it's a nightmare to change all poms that use it directly and indirectly.

So for me a +1 for this issue.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.x (to be reviewed)
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199.patch

Updated patch (class 'org.apache.maven.project.MavenProject' needed updating to also allow parent version ranges.)
                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199-3.0.4.patch
                MNG-2199.patch

Updated patches to handle unavailable versions for a given range.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.1.1
>
>         Attachments: MNG-2199-3.0.4.patch, MNG-2199-3.0.4.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-2199:
-----------------------------------

    Attachment: MNG-2199.patch

Updated the patch to additionally validate a 'version' to not use expressions.

{code}
Script started on Wed Sep 19 08:32:30 2012
$ cat pom.xml

<project>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>[,11]</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>mng2199</artifactId>
  <packaging>jar</packaging>
</project>
$ mvn clean

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.apache:mng2199:11 (/tmp/mng2199/pom.xml) has 1 error
[ERROR]     'version' must be a constant. @ org.apache:mng2199:[unknown-version], /tmp/mng2199/pom.xml, line 2, column 11
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
$ ^D


Script done on Wed Sep 19 08:32:42 2012
{code}

{code}
Script started on Wed Sep 19 08:33:36 2012
$ cat pom.xml

<project>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>[,11]</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>mng2199</artifactId>
  <packaging>jar</packaging>
  <version>1.0-${expression}-SNAPSHOT</version>
</project>
$ mvn clean

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.apache:mng2199:1.0-${expression}-SNAPSHOT (/tmp/mng2199/pom.xml) has 1 error
[ERROR]     'version' contains an expression but must be a constant. @ line 2, column 11
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
$ ^D


Script done on Wed Sep 19 08:33:47 2012
{code}

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Wish
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: MNG-2199.patch, MNG-2199.patch, MNG-2199.patch, MNG-2199.patch
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99678 ] 

Kenney Westerhof commented on MNG-2199:
---------------------------------------

tempting to 'close - won't fix'.

Whatever parent pom is present in the local repo will be used, resulting in a different effective pom on different systems.
This'll be the cause of all sorts of problems.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 2.1.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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-2199) Version ranges not supported for parent artifacts

Posted by "Alexander Wagner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=214322#action_214322 ] 

Alexander Wagner commented on MNG-2199:
---------------------------------------

I can agree with Joost den Boer. And it becomes more complex if you have not only one master pom but rather a few like special master poms for differend types of projects.

> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: http://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: 3.x (to be reviewed)
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

-- 
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] (MNG-2199) Version ranges not supported for parent artifacts

Posted by "Venkata (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302262#comment-302262 ] 

Venkata commented on MNG-2199:
------------------------------

Are there plans to address this ticket in near future?

I think we are missing a big step towards adding build reliability across build servers, esp. in a big organization where different teams have their own build/CI boxes.

Thanks.

                
> Version ranges not supported for parent artifacts
> -------------------------------------------------
>
>                 Key: MNG-2199
>                 URL: https://jira.codehaus.org/browse/MNG-2199
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, POM, Reactor and workspace
>    Affects Versions: 2.0.3
>            Reporter: Christian Schulte
>             Fix For: Issues to be reviewed for 3.x
>
>
> It would be great if Maven supports version ranges when specifying parent artifacts in a multi-module build. Currently this does not work.
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, 2.0.1]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, 2.0.1]/artifactId-[2.0, 2.0.1].pom
> Additionally it would be great if this
>   <parent>
>     <artifactId>artifactId</artifactId>
>     <groupId>groupId</groupId>
>     <version>[2.0, ${pom.version}]</version>
>   </parent>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/groupId/artifactId/[2.0, ${pom.version}]/artifactId-[2.0, ${pom.version}].pom
> would also work, if the version is specified in the same pom.xml which defines this parent definition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira