[ 
http://jira.codehaus.org/browse/MNG-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joern Huxhorn reopened MNG-4869:
--------------------------------


You are right, the original description missed a crucial piece of information 
that I just discovered:

The parent-version requested in the child pom was different from the version as 
defined in the parent pom itself, i.e. the parent had 
<version>1.0-SNAPSHOT</version> while the child requested 
<version>2.0-SNAPSHOT</version>.

This mistake didn't hurt in Maven 2 since (I guess) the parent version was 
ignored in the presence of a valid relativePath. This seems to have changed in 
Maven 3, which is actually ok/correct.

I tentatively reopened this issue anyway since I think that Maven 3 should 
warn/fail in such a situation. This obviously isn't a critical issue anymore, 
though.

Please let me know how we should handle this. Should I file a new issue 
(feature request) or will you change this one accordingly?

Interestingly, the title isn't that incorrect after all...

> Parent POM is not evaluated as expected, regression in Maven 3
> --------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
> Java version: 1.6.0_20
> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
>            Reporter: Joern Huxhorn
>            Assignee: Benjamin Bentmann
>            Priority: Critical
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> <properties>
>     <jettyVersion>6.1.9</jettyVersion>
> </properties>
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.mortbay.jetty</groupId>
>             <artifactId>maven-jetty-plugin</artifactId>
>             <version>${jettyVersion}</version>
>         </plugin>
>     </plugins>
> </build>
> A child module with the following configuration:
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.mortbay.jetty</groupId>
>             <artifactId>maven-jetty-plugin</artifactId>
>             <dependencies>
>                 <dependency>
>                     <groupId>org.mortbay.jetty</groupId>
>                     <artifactId>jetty-plus</artifactId>
>                     <version>${jettyVersion}</version>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.mortbay.jetty</groupId>
>                     <artifactId>jetty-naming</artifactId>
>                     <version>${jettyVersion}</version>
>                 </dependency>
>             </dependencies>
>         </plugin>
>     </plugins>
> </build>
> The property jettyVersion was added during the latest. The parent pom is the 
> first sub-module in the master pom, followed by the other sub-modules 
> including the child-module above. All <parent> definitions include correct 
> <relativePath> entries.
> Previously, it worked perfectly well to simply build the master pom, which in 
> turn built the parent followed by all other sub-modules.
> Since Maven 3, however, this didn't work anymore. Right after the addition of 
> the jettyVersion property, Maven 3 complained with the following error:
> [ERROR] The build could not read 24 projects -> [Help 1]
> [ERROR]   
> [ERROR]   The project xyz:2.0.0-SNAPSHOT (/path/to/child/pom.xml) has 2 errors
> [ERROR]     
> 'build.plugins.plugin[org.mortbay.jetty:maven-jetty-plugin].dependencies.dependency.version'
>  for org.mortbay.jetty:jetty-plus:jar must be a valid version but is 
> '${jettyVersion}'. @ line 28, column 28
> [ERROR]     
> 'build.plugins.plugin[org.mortbay.jetty:maven-jetty-plugin].dependencies.dependency.version'
>  for org.mortbay.jetty:jetty-naming:jar must be a valid version but is 
> '${jettyVersion}'. @ line 33, column 28
> Building the parent manually fixed this issue.
> To be precise, our actual project involved another parent level, i.e. the 
> parent described above was the parent of parent2 while parent2 was the parent 
> of the child module - but I don't think that this is relevant. I'm just 
> mentioning it just in case. Again, all <parent> definitions include correct 
> <relativePath> entries.
> This worked in Maven 2 so I think it's a regression.

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


Reply via email to