That was my question--thanks!

-----Original Message-----
From: simon [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2008 4:44 PM
To: Maven Users List
Subject: RE: Build child module in multi-module project

If you try to build a module in the middle of a hierarchy, maven does
NOT automatically build the projects it depends on. Simply not
supported. All dependencies must already be in a repository (on the
local machine, or remote) or the build will fail.

You can build in a directory, causing the submodules to be built but
that is all.

I hope that was your question..

Regards, Simon

On Mon, 2008-03-31 at 16:39 -0400, Dhruva Reddy wrote:
> Let's try depicting this again...
> 
> master-project (pom)
>       midlevel-project1 (pom)
>               war-project (war)
>               ear-project (ear)
>       midlevel-project2 (jar)
> 
> -----Original Message-----
> From: Dhruva Reddy [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 31, 2008 3:52 PM
> To: [email protected]
> Subject: Build child module in multi-module project
> 
> Apologies for the length, but it's mostly sample code...
> 
> I am reworking a multi-module project, using Maven 2.0.8, with the
> following structure:
> 
>                                          master-project (pom)
>               midlevel-project1 (pom)
> midlevel-project2 (jar)
>    war-project (war)     ear-project (ear)
> 
> master-project acts as both a parent and aggregator to the
> midlevel-project's.  midlevel-project1 acts as both a parent and
> aggregator to war-project and ear-project, which depend on
> midlevel-project2 (and there are multiple modules with the same
> structure as midlevel-project1).  Right now, I have POMs
(oversimplified
> and stripped of proprietary info) below.  I need to be able to
navigate
> to the master-project and build (which works fine).  I also need to be
> able to navigate to midlevel-project1 and build just that.  However,
> when I try to do the latter, it complains about the dependency
> midlevel-project2.  Is there a way to do this, or is multi-module
> building in maven an all-or-nothing proposition?
> 
> Thanks,
> Dhruva
> 
> *** master-project ***
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.xyz</groupId>
>   <artifactId>master-project</artifactId>
>   <packaging>pom</packaging>
>   <version>1.0-SNAPSHOT</version>
> 
>   <modules>
>     <module>midlevel-project1</module>
>     <module>midlevel-project2</module>
>   </modules>
> 
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>com.xyz</groupId>
>         <artifactId>midlevel-project2</artifactId>
>         <version>0.4-SNAPSHOT</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
> </project>
> 
> *** midlevel-project1 ***
> <project>
>   <parent>
>     <artifactId>master-project</artifactId>
>     <groupId>com.xyz</groupId>
>     <version>1.0-SNAPSHOT</version>
>     <relativePath>../master-project/pom.xml</relativePath>
>   </parent>
> 
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.xyz</groupId>
>   <artifactId>midlevel-project1</artifactId>
>   <packaging>pom</packaging>
>   <version>1.0-SNAPSHOT</version>
> 
>   <modules>
>     <module>war-project</module>
>     <module>ear-project</module>
>   </modules>
> 
>   <dependencies>
>     <dependency>
>       <groupId>com.xyz</groupId>
>       <artifactId>midlevel-project2</artifactId>
>     </dependency>
>   </dependencies>
> </project>
> 
> *** midlevel-project2 ***
> <project>
>   <parent>
>     <artifactId>master-project</artifactId>
>     <groupId>com.xyz</groupId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
> 
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.xyz</groupId>
>   <artifactId>master-project2</artifactId>
>   <version>0.4-SNAPSHOT</version>
> </project>
> 
> *** war-project ***
> <project>
>   <parent>
>     <artifactId>midlevel-project1</artifactId>
>     <groupId>com.xyz</groupId>
>     <version>1.0-SNAPSHOT</version>
>     <relativePath>../pom.xml</relativePath>
>   </parent>  
>   <modelVersion>4.0.0</modelVersion>
>   <version>1.0-SNAPSHOT</version>
>   <artifactId>war-project</artifactId>
>   <packaging>war</packaging>
> </project>
> 
> *** ear-project ***
> <project>
>   <parent>
>     <artifactId>midlevel-project1</artifactId>
>     <groupId>com.xyz</groupId>
>     <version>1.0-SNAPSHOT</version>
>     <relativePath>../pom.xml</relativePath>
>   </parent>
>   <modelVersion>4.0.0</modelVersion>
>   <version>1.0-SNAPSHOT</version>
>   <artifactId>ear-project</artifactId>
>   <packaging>ear</packaging>
> </project>
> 
> ---------------------------------------------------------------------
> 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]
> 


---------------------------------------------------------------------
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