[ http://jira.codehaus.org/browse/MNG-2308?page=all ]
Kenney Westerhof updated MNG-2308: ---------------------------------- Fix Version/s: (was: 2.0.5) 2.0.6 > Cascading POMs with packaging=pom > --------------------------------- > > Key: MNG-2308 > URL: http://jira.codehaus.org/browse/MNG-2308 > Project: Maven 2 > Issue Type: Bug > Components: POM > Affects Versions: 2.0.4 > Environment: AIX (Java build 1.4.2, J2RE 1.4.2 IBM AIX) , Windows XP > ( Java SUN 1.4.2_10-b03) > Maven 2.0.4 > Reporter: Carsten Karkola > Fix For: 2.0.6 > > > Given the following directory layout > /a - pom.xml > /b - pom.xml > - /b.a -pom.xml > The poms - a/pom.xml: > ------------------------------------------- > <?xml version="1.0" encoding="iso-8859-1"?> > <project > xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.foo</groupId> > <artifactId>a</artifactId> > <version>I</version> > <name>Module A</name> > <packaging>pom</packaging> > <modules> > <module>b</module> > </modules> > </project> > The poms - a/b/pom.xml: > ------------------------------------------- > <?xml version="1.0" encoding="iso-8859-1"?> > <project > xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <parent> > <groupId>com.foo</groupId> > <artifactId>a</artifactId> > <version>I</version> > </parent> > <modelVersion>4.0.0</modelVersion> > <groupId>com.foo</groupId> > <artifactId>b</artifactId> > <version>I</version> > <name>Module B</name> > <packaging>pom</packaging> > <modules> > <module>b.a</module> > </modules> > </project> > The poms - a/b/b.a/pom.xml: > ------------------------------------------- > <?xml version="1.0" encoding="iso-8859-1"?> > <project > xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <parent> > <groupId>com.foo</groupId> > <artifactId>b</artifactId> > <version>I</version> > </parent> > <modelVersion>4.0.0</modelVersion> > <groupId>com.foo</groupId> > <artifactId>b.a</artifactId> > <version>I</version> > <name>Module B.A</name> > <packaging>jar</packaging> > </project> > The error occurs only in direcotry a/b (the build in dir a and in dir a/b/b.a > works fine): > $> cd ~/a/b > $> mvn compile > [INFO] Scanning for projects... > Downloading: http://.../repository/com/foo/a/I/a-I.pom > [WARNING] Unable to get resource from repository central > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > GroupId: com.foo > ArtifactId: a > Version: I > It seems that there is a problem with more than one parent with packaging=pom. > The <relativePath>--Element didn't help. The only workearound (suggested in > the maven user mailing list) is, to deploy the parent > poms to the maven repo. -- 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