You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Rafael Bedia (JIRA)" <ji...@codehaus.org> on 2012/06/18 16:40:21 UTC
[jira] (MNG-5298) Non-resolvable parent POM when parent is
duplicated
Rafael Bedia created MNG-5298:
---------------------------------
Summary: Non-resolvable parent POM when parent is duplicated
Key: MNG-5298
URL: https://jira.codehaus.org/browse/MNG-5298
Project: Maven 2 & 3
Issue Type: Bug
Components: Inheritance and Interpolation
Affects Versions: 3.0.4
Reporter: Rafael Bedia
Priority: Minor
Attachments: maven-resolve-problem.zip
I have a set of artifacts with the following structure:
maven-resolve-problem/
âââ module1
â  âââ parent
â  â  âââ pom.xml
â  âââ pom.xml
âââ module2
â  âââ parent
â  â  âââ pom.xml
â  âââ pom.xml
âââ pom.xml
module1 and module2 both have the same parent artifact named root. Each module
has its own independent copy of the parent module. maven-resolve-problem is an
aggregator of module1 and module2. If I do:
maven-resolve-problem/module1$ mvn package
or
maven-resolve-problem/module2$ mvn package
both builds are successful.
If I do
maven-resolve-problem$ mvn package
then I get the following build error:
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.example:module2:0.1-SNAPSHOT (/home/rafaelb/maven-resolve-problem/module2/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.example:root:pom:0.1-SNAPSHOT in http://pusher:8888/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 3, column 13 -> [Help 2]
[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
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
The second module is not able to find the parent using the relativePath and
instead tries to use the repository which intentionally does not have the parent.
In Maven 2 this arrangement of artifacts builds successfully. So resolving parents
changed somehow between Maven 2 and 3. The obvious workaround is to have a
single parent artifact directory that both modules reference which does work
correctly as expected.
I attached the example projects which recreate the error.
--
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-5298) Non-resolvable parent POM when parent is
duplicated
Posted by "Rafael Bedia (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301359#comment-301359 ]
Rafael Bedia commented on MNG-5298:
-----------------------------------
The directory structure got garbled. Here it is more readable:
{noformat}
maven-resolve-problem/
+- module1
| +- parent
| | \- pom.xml
| \- pom.xml
+- module2
| +- parent
| | \- pom.xml
| \- pom.xml
\- pom.xml
{noformat}
> Non-resolvable parent POM when parent is duplicated
> ---------------------------------------------------
>
> Key: MNG-5298
> URL: https://jira.codehaus.org/browse/MNG-5298
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Inheritance and Interpolation
> Affects Versions: 3.0.4
> Reporter: Rafael Bedia
> Priority: Minor
> Attachments: maven-resolve-problem.zip
>
>
> I have a set of artifacts with the following structure:
> maven-resolve-problem/
> âââ module1
> â  âââ parent
> â  â  âââ pom.xml
> â  âââ pom.xml
> âââ module2
> â  âââ parent
> â  â  âââ pom.xml
> â  âââ pom.xml
> âââ pom.xml
> module1 and module2 both have the same parent artifact named root. Each module
> has its own independent copy of the parent module. maven-resolve-problem is an
> aggregator of module1 and module2. If I do:
> maven-resolve-problem/module1$ mvn package
> or
> maven-resolve-problem/module2$ mvn package
> both builds are successful.
> If I do
> maven-resolve-problem$ mvn package
> then I get the following build error:
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR] The project com.example:module2:0.1-SNAPSHOT (/home/rafaelb/maven-resolve-problem/module2/pom.xml) has 1 error
> [ERROR] Non-resolvable parent POM: Failure to find com.example:root:pom:0.1-SNAPSHOT in http://pusher:8888/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 3, column 13 -> [Help 2]
> [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
> [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
> The second module is not able to find the parent using the relativePath and
> instead tries to use the repository which intentionally does not have the parent.
> In Maven 2 this arrangement of artifacts builds successfully. So resolving parents
> changed somehow between Maven 2 and 3. The obvious workaround is to have a
> single parent artifact directory that both modules reference which does work
> correctly as expected.
> I attached the example projects which recreate the error.
--
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