LISTING 1

<dependency>
  <groupId>maven-was</groupId>
  <artifactId>sample-util</artifactId>
  <version>1.0</version>
  <properties>
    <ear.bundle>true</ear.bundle>
  </properties>
</dependency>
<dependency>
  <groupId>maven-was</groupId>
  <artifactId>sample-ejb</artifactId>
  <version>1.0</version>
  <type>ejb</type>
  <properties>
    <ear.bundle>true</ear.bundle>
  </properties>
</dependency>
<dependency>
  <groupId>maven-was</groupId>
  <artifactId>sample-war</artifactId>
  <version>1.0</version>
  <type>war</type>
  <properties>
    <ear.bundle>true</ear.bundle>
    <ear.appxml.war.context-root>sample</ear.appxml.war.context-root>
  </properties>
</dependency>


LISTING 2

<postGoal name="ear:ear">
  <j:choose>

<j:when test="${was.reinstall.app}">
      <!-- reinstall the application -->
      <attainGoal name="was5:reinstallApp"/>
    </j:when>
    <j:otherwise>
      <!-- deploy EAR -->
      <attainGoal name="was5:installApp"/>

      <!-- start the application -->
      <attainGoal name="was5:startApp"/>
    </j:otherwise>
  </j:choose>
</postGoal>


LISTING 3

<!-- build all subprojects -->
<goal name="build">
  <j:set var="goals" value="build"/>
  <attainGoal name="projects:reactor"/>
</goal>

<!-- reactor goal -->
<goal name="projects:reactor">
  <maven:reactor
    basedir="${basedir}"
    includes="**/project.xml"
    excludes="project.xml"
    banner="Executing (${goals}):"
    ignoreFailures="false"
    goals="${goals}"
    postProcessing="true"
  />
</goal>