You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joern Huxhorn (JIRA)" <ji...@codehaus.org> on 2010/10/18 18:19:32 UTC

[jira] Created: (MNG-4869) Parent POM is not evaluated as expected, regression in Maven 3

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
            Priority: Critical


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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

Posted by "Joern Huxhorn (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240135#action_240135 ] 

Joern Huxhorn commented on MNG-4869:
------------------------------------

I just read at http://www.developer.com/open/article.php/3908561/article.htm "3. Automatic Parent Versioning" that the version of the parent pom will soon (i.e. in Maven 3.1) be optional.

In that case an explicit version would already resemble an "I really mean it" marker, making this whole suggestion/issue mostly unnecessary.

My suggestion of printing a warning message was based on the assumption that the parent version would still be required.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Updated: (MNG-4869) Warn when relativePath points at parent POM with different version

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

Benjamin Bentmann updated MNG-4869:
-----------------------------------

    Component/s: POM
    Description: 
We have the following situation in our project:

A parent pom containing the following infos:
{code:xml}
<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>
{code}
A child module with the following configuration:
{code:xml}
<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>
{code}
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:
{noformat}
[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
{noformat}
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.

  was:
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.

       Priority: Trivial  (was: Critical)
     Issue Type: Improvement  (was: Bug)
        Summary: Warn when relativePath points at parent POM with different version  (was: Parent POM is not evaluated as expected, regression in Maven 3)

bq. 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.
Both Maven 2.x and 3.x fall back to resolution from the local/remote repos if the parent given by {{relativePath}} doesn't have the exact coordinates (groupId, artifactId and version) as requested by the child. That said, without concrete examples and logs, I currently cannot tell what the relevant difference here is.

bq. I think that Maven 3 should warn/fail in such a situation
Maven 3.0 introduced a related warning for {{relativePath}} ([MNG-4619]) that some users already complained about. To my knowledge, child POMs inheriting from a different parent version than in the local checkout isn't uncommon, so emitting a warning here seems even more harm than good. But well, I'll leave that issue open for discussion/voting.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Reopened: (MNG-4869) Parent POM is not evaluated as expected, regression in Maven 3

Posted by "Joern Huxhorn (JIRA)" <ji...@codehaus.org>.
     [ 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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

Posted by "Joern Huxhorn (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240018#action_240018 ] 

Joern Huxhorn commented on MNG-4869:
------------------------------------

I just read that the behavior didn't change in Maven 3. Sure? I had the impression that the parent pom at the relative path was always taking precedence over poms from the local repository.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

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

Benjamin Bentmann commented on MNG-4869:
----------------------------------------

No offense but seriously, despite some rumors, Maven is a build tool, not some esoteric box, i.e. there is little point in talking about impressions. All that matters are logs and reproducible examples, otherwise we end up talking about thin air. So, taking the example project I provided and changing {{child/pom.xml}} to inherit from {{parent2:1.1-SNAPSHOT}}, I see both Maven 2.x and 3.x failing to locate the parent (assuming version 1.1-SNAPSHOT wasn't installed to the local repo before). Yes, there are some changes regarding parent resolution, but I fail to see how those affect the example project or for that matter your setup (which I don't know but can only guess).

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Closed: (MNG-4869) Parent POM is not evaluated as expected, regression in Maven 3

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

Benjamin Bentmann closed MNG-4869.
----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Benjamin Bentmann

> 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

       

[jira] Updated: (MNG-4869) Warn when relativePath points at parent POM with different version

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

Benjamin Bentmann updated MNG-4869:
-----------------------------------

    Assignee:     (was: Benjamin Bentmann)

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

Posted by "Joern Huxhorn (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240017#action_240017 ] 

Joern Huxhorn commented on MNG-4869:
------------------------------------

Ok, I see.

The MNG-4619 feature did actually help me already while migrating from Maven 2 to Maven 3. I liked it a lot. The enhanced diagnostic messages are the main Maven 3 feature for me, at least for now.

I think, but that's of course only my opinion, that a version mismatch in the presence of a relative path is at least somewhat strange. It would probably be a case for some "I really mean it" marker for the parent version or an option to disable such a check.
In our 360 module project such a situation would always be a mistake. But others might use Maven differently.

Otherwise an issue like the one that bit me is pretty hard to diagnose, especially since the behavior changed from Maven 2. I double- and triple-checked the relative path but overlooked the version issue repeatedly.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Updated: (MNG-4869) Parent POM is not evaluated as expected, regression in Maven 3

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

Benjamin Bentmann updated MNG-4869:
-----------------------------------

    Attachment: MNG-4869.zip

>From the information given, I'm not able to reproduce the issue using the attached example project. So please re-open with a complete/runnable project that exhibits the problem and allows its analysis.

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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

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

Benjamin Bentmann commented on MNG-4869:
----------------------------------------

bq, If my last comment sounded offensive it definitely wasn't meant to do so. I was merely surprised.
No worries, I got that. All I was trying is to highlight is the importance of logs and reproducible examples, i.e. concrete data points. I am still surprised how many people fill bugs or ask for help with troubleshooting their build issues without enabling others to reproduce/analyze the issue. Efficient communication is the art of eliminating guess work.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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

       

[jira] Commented: (MNG-4869) Warn when relativePath points at parent POM with different version

Posted by "Joern Huxhorn (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240024#action_240024 ] 

Joern Huxhorn commented on MNG-4869:
------------------------------------

I didn't mean to imply you were wrong.

Instead I obviously had the wrong impression all the time. If my last comment sounded offensive it definitely wasn't meant to do so. I was merely surprised.

Thanks for taking the time to analyze this.

> Warn when relativePath points at parent POM with different version
> ------------------------------------------------------------------
>
>                 Key: MNG-4869
>                 URL: http://jira.codehaus.org/browse/MNG-4869
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>    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
>            Priority: Trivial
>         Attachments: MNG-4869.zip
>
>
> We have the following situation in our project:
> A parent pom containing the following infos:
> {code:xml}
> <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>
> {code}
> A child module with the following configuration:
> {code:xml}
> <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>
> {code}
> 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:
> {noformat}
> [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
> {noformat}
> 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