[ https://jira.codehaus.org/browse/MNG-5117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274243#comment-274243 ]
Benjamin Bentmann commented on MNG-5117: ---------------------------------------- {noformat} >cd com.example.module1 >mvn -V clean Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.5.0_22 Java home: D:\java\jdk-1.5\jre Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows" [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. GroupId: com.example ArtifactId: com.example.parent Version: 0.1.0-SNAPSHOT Reason: Unable to download the artifact from any repository com.example:com.example.parent:pom:0.1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.example:com.example.parent for project: com.example:com.example.module1:pom:0.1.0-SNAPSHOT for project com.example:com.example.module1:pom:0.1.0-SNAPSHOT at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) {noformat} Your project structure is broken which even Maven 2 eventually tells you when you try to build com.example.module1 in isolation (assuming the parent got never installed). That this issue is not consequently reported to the user when doing builds from the aggregator POM is a bug in Maven 2, not a feature, and Maven 3 does not reproduce every buggy behavior of Maven 2. See also [Maven 3.x compatibility notes|https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html]. > UnresolvableModelException in aggregator POM when parent POM is separate and > not yet built > ------------------------------------------------------------------------------------------ > > Key: MNG-5117 > URL: https://jira.codehaus.org/browse/MNG-5117 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Bootstrap & Build, Command Line, POM > Affects Versions: 3.0.3 > Reporter: Jonathan Whitall > Assignee: Benjamin Bentmann > Attachments: com.example.zip, maven2.log, maven3.log > > > I get the following error when attempting to build an aggregator POM who > references an external parent (but locally specified by parent.relativePath): > Non-resolvable parent POM: Could not find artifact > com.example:com.example.parent:pom:0.1.0-SNAPSHOT and 'parent.relativePath' > points at wrong local POM @ line 4, column 10 > Example is attached as well as two log files (one for Maven 2.2.1 which works > correctly, one for Maven 3.0.3 which does not) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira