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

[jira] Created: (MNG-4907) Wrong error message when relativePath wrong

Wrong error message when relativePath wrong
-------------------------------------------

                 Key: MNG-4907
                 URL: http://jira.codehaus.org/browse/MNG-4907
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: Inheritance and Interpolation
    Affects Versions: 3.0
         Environment: maven 3.0, windows XP
            Reporter: Marshall Schor
            Priority: Minor
         Attachments: mvn-parent-relative-path.zip

I'll attach a zipped sample showing the issue; it has 3 folders, each having a small pom.  They are named childFolder, parentFolder, and submodule.

The child has the parent as its parent.

The child has a <modules> section listing the parent and the submodule as things to be built.

The submodule list "parent" as its parent, but fails (on purpose, to illustrate the issue) to include a <relativePath> element.

If I do mvn clean on the "submodule", it says, correctly:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project t:submodule:1-SNAPSHOT (D:\mavenAlign\trunk\mvn-parent-relative-path\submodule\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact t:parent:pom:1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 8, column 11 -> [Help 2]

   Note: line 8, column 11 is right after the "<parent>" element in the source.

But, if I run mvn clean on the "child", it says, incorrectly:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project t:child:1-SNAPSHOT (D:\mavenAlign\trunk\mvn-parent-relative-path\childFolder\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact t:parent:pom:1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]

In fact, the ...\childFolder\pom.xml doesn't have an error, and the message that it points at the wrong local POM at line 5, column 11 is not correct.  If you comment out the <module> reference in this pom to the "submodule", it works fine.  The error is actually in the submodule.  The line 5, column 11 refers to a spot right after the "<parent>" element in the child module, where everything is OK.

This of course, misleads the person trying to debug this, to look hard in the wrong place :-).

-- 
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-4907) Wrong error message when relativePath wrong

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

Benjamin Bentmann closed MNG-4907.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.1
         Assignee: Benjamin Bentmann

The referenced parent POM lacks the version and as such can't match the requirement of the child POM. Improved error message in [r1037475|http://svn.apache.org/viewvc?view=revision&revision=1037475].

> Wrong error message when relativePath wrong
> -------------------------------------------
>
>                 Key: MNG-4907
>                 URL: http://jira.codehaus.org/browse/MNG-4907
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0
>         Environment: maven 3.0, windows XP
>            Reporter: Marshall Schor
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 3.0.1
>
>         Attachments: mvn-parent-relative-path.zip
>
>
> I'll attach a zipped sample showing the issue; it has 3 folders, each having a small pom.  They are named childFolder, parentFolder, and submodule.
> The child has the parent as its parent.
> The child has a <modules> section listing the parent and the submodule as things to be built.
> The submodule list "parent" as its parent, but fails (on purpose, to illustrate the issue) to include a <relativePath> element.
> If I do mvn clean on the "submodule", it says, correctly:
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project t:submodule:1-SNAPSHOT (D:\mavenAlign\trunk\mvn-parent-relative-path\submodule\pom.xml) has 1 error
> [ERROR]     Non-resolvable parent POM: Could not find artifact t:parent:pom:1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 8, column 11 -> [Help 2]
>    Note: line 8, column 11 is right after the "<parent>" element in the source.
> But, if I run mvn clean on the "child", it says, incorrectly:
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project t:child:1-SNAPSHOT (D:\mavenAlign\trunk\mvn-parent-relative-path\childFolder\pom.xml) has 1 error
> [ERROR]     Non-resolvable parent POM: Could not find artifact t:parent:pom:1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]
> In fact, the ...\childFolder\pom.xml doesn't have an error, and the message that it points at the wrong local POM at line 5, column 11 is not correct.  If you comment out the <module> reference in this pom to the "submodule", it works fine.  The error is actually in the submodule.  The line 5, column 11 refers to a spot right after the "<parent>" element in the child module, where everything is OK.
> This of course, misleads the person trying to debug this, to look hard in the wrong place :-).

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