Thank you for your hint, Marcel. But the <relativePath> entry didn't help, 
Maven tries to look up the pom in the repo:

Reason: Unable to download the artifact from any repository

  com.foo:a:pom:I

regards, carsten

On 18 May 2006 at 13:25, Marcel May wrote:

> Try the in the suprojects "/project/parent/relativePath" setting ...
> seems that takes precendence over repository resolution when building.
> 
> Example for b:
> <parent>
>   <relativePath>../pom.xml</relativePath>
> </parent>
> 
> Does this help?
> 
> Cheers,
> Marcel
> 
> Carsten Karkola wrote:
> > Hi,
> >
> > I've created the following directory layout
> >
> >  /a - pom.xml
> >    /b - pom.xml
> >        - /b.a -pom.xml
> >
> > My executions:
> >   $> cd ~/a
> >   $> mvn compile
> >   [INFO] BUILD SUCCESSFUL
> >
> >   $> cd ~/a/b/b.a
> >   $> mvn compile
> >   [INFO] BUILD SUCCESSFUL
> >
> >   $> 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
> >
> > I've looked at the effective poms with mvn help:effective-pom, the poms in 
> > directory a and in 
> > directory b.a are ok., the creation of the pom in b fails. It seems that 
> > there is a problem with 
> > more than one parent with packaging=pom.
> >
> > The only workearound (suggested in the maven user mailing list) is, to 
> > deploy the parent 
> > poms to the maven repo, but this way you can't do a standalone compile or 
> > package if you 
> > have changed the parent pom.
> >
> > regards, carsten
> >
> > 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>
> >
> > ------- End of forwarded message -------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >   
> 
> 
> -- 
> Marcel May
> ConSol* Software GmbH
> Tel: +49 89 45841-155
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to