Hi TJ, I have the same problem. if anyone know of an example pom.xml that would be great!
I remember reading from the maven documentations, that you have to set the project up in a particular directory structure to get this to work. Which is no good for me :-( I recall the directory you need is: /ParentProjDirectory pom.xml (put your modules etc) /ParentProjDirectory/Child#1ProjDirectory pom.xml (put a reference to the parent project) /ParentProjDirectory/Child#2ProjDirectory pom.xml (put a reference to parent project) /ParentProjDirectory/Child#3ProjDirectory pom.xml (put a reference to the parent project) What I want is the directory structure you outlined below, cos this is a lot better from a development perspective, as ppl could just check out the bit they are working on, not everything. But so far I haven't had a lot mileage on this one. Can anyone else shed some light here? cheers, paul On 3/25/06, TJ Greenier <[EMAIL PROTECTED]> wrote: > Hi all, > > I used Maven in the past and I am trying to get up to speed with Maven 2.0. > I have a question regarding multiple projects and was hoping that someone > can point me in the right directions, as I am getting a little confused. > > My intentions: > I have a project that can be separated as client, server and common code > bases. > I want to be able to check out each one independently to build and unit > test. > I also want to be able to build the project as a whole in which I would get > two resulting archive files (say client.jar and server.war) > > Currently my project is structured as follows: > MyProject > - ClientProject > - packages.... > - pom.xml (jar type) > - ServerProject > - packages.... > - pom.xml (war type) > - CommonProject > - packages.... > - pom.xml (jar type, this project is used by both client and server) > - pom.xml > > The MyProject pom.xml content: > <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.company.project</groupId> > <artifactId>MyProject</artifactId> > <version>1.0-SNAPSHOT</version> > <packaging>pom</packaging> > <name>MyProject</name> > <modules> > <module>ClientProject</module> > <module>ServerProject</module> > <module>CommonProject</module> > </modules> > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>3.8.1</version> > <scope>test</scope> > </dependency> > </dependencies> > </project> > > My Issues: > I can currently build each project separately, but I am struggling with > building the over all project and getting two archives (jar and war). > I am open to suggestions if I am going about this the wrong way, but I was > hoping that someone could point me to an example or link that would help me > work through this. My thoughts were that the pom packaging would just > execute the packaging for each subproject, thus getting me the client.jarand > server.war files that I need. > > My project is currently using Ant and has duplicated a lot of what Maven can > do in a nonstandard manner. I am hoping to use Maven 2.0 to cleanup our > build process and remove some of our issues with our current build process. > > Many thanks in advance. > > T.J. Greenier > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
