maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Pyeron" <jpye...@pdinc.us>
Subject RE: [maven] Re: Auto building parent and sibling projects as needed
Date Mon, 12 Sep 2011 13:33:22 GMT
> -----Original Message-----
> From: Guillaume Polet 
> Sent: Monday, September 12, 2011 3:01
> To: Maven Users List
> Subject: Re: [maven] Re: Auto building parent and sibling 
> projects as needed
> 
> Le 11/09/2011 17:37, Jason Pyeron a écrit :
> >> -----Original Message-----
> >> From: Guillaume Polet
> >> Sent: Sunday, September 11, 2011 4:07
> >> To: Maven Users List
> >> Subject: [maven] Re: Auto building parent and sibling projects as 
> >> needed
> >>
> >> The problem is that a child does not know where the sources of its 
> >> parents are located,
> > Is it not the point of<relativePath>../pom.xml</relativePath>?
> No, this simply indicates where to look relatively to find a 
> pom.xml if it is not installed in your local repository (or a 
> remote one where it could be fetched from).

Is this a design or bug of the reactor?

> >> and therefore it is completely
> >> unable to trigger its build. You probably have set up one or more 
> >> parent aggregator projects and you mapped this hierarchy onto the 
> >> file/directory structure but this is not mandatory at all. You can 
> >> very well use a parent just to define the default version 
> to use for 
> >> dependencies, or the default target of the compiler, other 
> properties 
> >> that are common through all your projects and many more things.
> >> You should probably read again the first two paragraphs here:
> >>
> > 
>
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project

<snip/>

> Hard to say why your second build is failing. I just tried a 
> similar setup and it worked in all cases:
> parent:

The difference is that you are saying that the children A & B are pom packaged,
which does not cause compile to kick off, which inturn does not need the
dependency.

<snip/>

> B:
> <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>test</groupId>
> <artifactId>B</artifactId>
> <name>B</name>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> <parent>
> <groupId>test</groupId>
> <artifactId>parent</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <relativePath>../pom.xml</relativePath>

<snip/>

> 
> Your log says the following:
> --> cannot find the pom.xml from project A (This I don't 
> understand why) 
> --> jar file of project A cannot be found
> 
> Try 'mvn install' so that the pom and the jar file is 
> deployed locally because it will not find the jar in the 
> target directory.
> 

An install would not be appropiate for this part of the development lifecycle.
For argument sake, lets assume that not every module passes all unit tests but
all compile and we are in a SNAPSHOT versioning.

-Jason

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message