[ 
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

        

Reply via email to