28 September 2011

How to have WAR and JAR folders exploded in an EAR project built by Maven

Add the attribute unpack=true (example below)

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>com.urcompany</groupId>
<artifactId>xxx-web</artifactId>
<contextRoot>/</contextRoot>
<unpack>true</unpack>
</webModule>
<ejbModule>
<groupId>com.urcompany</groupId>
<artifactId>xxx-ejb</artifactId>
<unpack>true</unpack>
</ejbModule>
</modules>
</configuration>
</plugin>