I have a EAR maven based project that its structure is like below :
------ root
|
|--- EAR
|
|---- EJB (JAR)
|
|---- WEB (WAR)
I want to make a goal for it that first clean all three EAR , EJB , WEB ,module then first install EJB after that install WEB and at the end install EAR because of their dependencies
how I have to do it in just one command line in maven?
here is my pom.xml for root
<url>http://jboss.org/jbossas</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<modules>
<module>ejb</module>
<module>web</module>
<module>ear</module>
</modules>
<properties>
<dependencyManagement>
<dependencies>
<!-- Define the version of the EJB jar so that we don't need
to repeat ourselves in every module -->
<dependency>
<groupId>RHAMavenBased</groupId>
<artifactId>RHAMavenBased-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<!-- Define the version of the WAR so that we don't need to repeat
ourselves in every module -->
<dependency>
<groupId>RHAMavenBased</groupId>
<artifactId>RHAMavenBased-web</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>compile</scope>
</dependency>