See "How do I build more than one project at once?" here:
http://maven.apache.org/guides/getting-started/index.html

If you are using Eclipse, this can be useful:
http://maven.apache.org/guides/mini/guide-ide-eclipse.html

Otherwise, search the mail: http://www.nabble.com/Maven---Users-f178.html


Richard Allen


Frank Russo wrote:

Do you or anyone else know where (if it exists) the documention is for
this? The pom descriptor only shows <modules/>. If anyone knows how to use this, please pass along.
Thanks...

Frank Russo
Senior Developer
FX Alliance, LLC


-----Original Message-----
From: Richard Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 8:57 AM
To: Maven Users List
Subject: Re: [m2] parent pom

If your parent project POM lists <modules>, then those projects will be
built when the parent is built.

Richard Allen



Frank Russo wrote:

I have a question in regards to this. Is there a way to build the projects as a whole, as you say? As of now, I have to run maven on each

individual child, and I'm not sure if there is one way to call maven to

run the parent and all children at once.

Does anyone know if this is doable?

Frank Russo
Senior Developer
FX Alliance, LLC


-----Original Message-----
From: Maria Odea Ching [mailto:[EMAIL PROTECTED]
Sent: Monday, January 30, 2006 10:17 PM
To: Maven Users List
Subject: Re: [m2] parent pom

Hi Fredy,

The concept of parent poms can be applied to multi-module projects wherein it provides you the priviledge of building your modules individually or as a whole (project).
You need to define your parent pom in your project's root directory
(ex.
C:\Project\pom.xml ) and the children pom in each module's root directory (ex. C:\Project\module-1\pom.xml).

Please take a look below at the sample parent and child poms.

Parent POM:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>sample.project</groupId>
<artifactId>sample</artifactId>
<packaging>pom</packaging>
<name>Sample Project</name>
<version>1.0-SNAPSHOT</version>
<description>This is a sample project</description>
<modules>
  <module>module-1</module>
  <module>module-2</module>
  <module>module-3</module>
</modules>
<dependencies>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
  </dependency>
</dependencies>
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>2.0</version>
    </dependency>
  </dependencies>
</dependencyManagement>
</project>


Module-1 Child POM:
<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>sample.project</groupId>
  <artifactId>sample</artifactId>
  <version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>module-1</artifactId>
<name>Sample Project Module 1</name>
<dependencies>
  <dependency>
    <groupId>org.apache.maven</groupId>
    <artifactId>maven-model</artifactId>
  </dependency>
</dependencies>
</project>

Thanks,
Odea


Fredy wrote:



hi,
i've read something about the parent pom at multiple places, but have
not found an explanation about it.


Is there a doc about parent pom's? Where to define it, how to extend
it?? Do it mean a pom in a multi module project like mojo-sandbox?


Fredy

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




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