I always use ant to build/package,this is my first time to use maven2.
It's a ear maven project,also it include some sub maven project,such as war,ejb,jar and so on,here are the sample:
[b]<1>cpp's pom.xml[/b]
[code]
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<name>cpp</name>
<modules>
<module>cpp-common</module>
<module>cpp-ejb</module>
<module>cpp-josso</module>
<module>cpp-ear</module>
</modules>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<2> cpp-common's pom.xml[/b]
[code]
<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>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>cpp-common</name>
<url>..\..\cpp-common\target\site</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.0.ga</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<3>cpp-ejb's pom.xml[/b]
[code]
<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>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<packaging>ejb</packaging>
<version>1.0</version>
<name>cpp-ejb</name>
<url>..\..\cpp-ejb\target\site</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.0.ga</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-annotations-ejb3</artifactId>
<version>4.2.0.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-ejb-api</artifactId>
<version>4.2.0.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss.jbossws</groupId>
<artifactId>jboss-jaxws</artifactId>
<version>2.0.1.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
<optional>true</optional>
</dependency>
<!--
<dependency>
<groupId>jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.1</version>
<optional>true</optional>
</dependency>
-->
<dependency>
<groupId>com.nxj</groupId>
<artifactId>jboss-j2ee</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<!--
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>2.1.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1_3</version>
<optional>true</optional>
</dependency>-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven-repo</id>
<name>Maven repository</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>jboss-repo</id>
<name>jboss repository</name>
<url>http://repository.jboss.com/maven2</url>
</repository>
</repositories>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<4>cpp-josso's pom.xml[/b]
[code]
<project>
<parent>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>cpp-josso</name>
<url>..\..\cpp-josso\target\site</url>
<dependencies>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>josso</artifactId>
<version>1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts-legacy</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<5>cpp-ear's pom.xml[/b]
[code]
<project>
<parent>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-ear</artifactId>
<name>cpp-ear</name>
<packaging>ear</packaging>
<description>cpp ear</description>
<url>..\..\cpp-ear\target\site</url>
<dependencies>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<!--defaultBundleDir>lib</defaultBundleDir-->
<modules>
<jarModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<includeInApplicationXml>
true
</includeInApplicationXml>
</jarModule>
<ejbModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
</ejbModule>
<webModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<contextRoot>/josso</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
It's a ear maven project,also it include some sub maven project,such as war,ejb,jar and so on,here are the sample:
[b]<1>cpp's pom.xml[/b]
[code]
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<name>cpp</name>
<modules>
<module>cpp-common</module>
<module>cpp-ejb</module>
<module>cpp-josso</module>
<module>cpp-ear</module>
</modules>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<2> cpp-common's pom.xml[/b]
[code]
<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>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>cpp-common</name>
<url>..\..\cpp-common\target\site</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.0.ga</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<3>cpp-ejb's pom.xml[/b]
[code]
<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>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<packaging>ejb</packaging>
<version>1.0</version>
<name>cpp-ejb</name>
<url>..\..\cpp-ejb\target\site</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.0.ga</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-annotations-ejb3</artifactId>
<version>4.2.0.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-ejb-api</artifactId>
<version>4.2.0.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jboss.jbossws</groupId>
<artifactId>jboss-jaxws</artifactId>
<version>2.0.1.GA</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
<optional>true</optional>
</dependency>
<!--
<dependency>
<groupId>jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.1</version>
<optional>true</optional>
</dependency>
-->
<dependency>
<groupId>com.nxj</groupId>
<artifactId>jboss-j2ee</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<!--
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>2.1.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1_3</version>
<optional>true</optional>
</dependency>-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven-repo</id>
<name>Maven repository</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>jboss-repo</id>
<name>jboss repository</name>
<url>http://repository.jboss.com/maven2</url>
</repository>
</repositories>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<4>cpp-josso's pom.xml[/b]
[code]
<project>
<parent>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>cpp-josso</name>
<url>..\..\cpp-josso\target\site</url>
<dependencies>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>josso</artifactId>
<version>1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>struts</groupId>
<artifactId>struts-legacy</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]
[b]<5>cpp-ear's pom.xml[/b]
[code]
<project>
<parent>
<groupId>com.nxj</groupId>
<artifactId>cpp</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nxj</groupId>
<artifactId>cpp-ear</artifactId>
<name>cpp-ear</name>
<packaging>ear</packaging>
<description>cpp ear</description>
<url>..\..\cpp-ear\target\site</url>
<dependencies>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<!--defaultBundleDir>lib</defaultBundleDir-->
<modules>
<jarModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-common</artifactId>
<includeInApplicationXml>
true
</includeInApplicationXml>
</jarModule>
<ejbModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-ejb</artifactId>
</ejbModule>
<webModule>
<groupId>com.nxj</groupId>
<artifactId>cpp-josso</artifactId>
<contextRoot>/josso</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
[/code]