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
