<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>
  <packaging>pom</packaging>

  <parent>
    <groupId>org.mobicents.servers.diameter.resources</groupId>
    <artifactId>ro-parent</artifactId>
    <version>2.0.0.GA</version>
  </parent>

  <artifactId>ro-ra-DU</artifactId>

  <name>Mobicents :: Diameter Resources :: ${pom.artifactId}</name>

  <dependencies>
    <!-- common library -->
    <dependency>
      <groupId>org.mobicents.servers.diameter.resources</groupId>
      <artifactId>cca-common-library</artifactId>
      <version>${mobicents.diameter.resources.cca-common.version}</version>
    </dependency>
    <!-- components -->
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>ro-events</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>ro-ratype</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>ro-ra</artifactId>
      <version>${pom.version}</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>diameter-${pom.artifactId}-${pom.version}</finalName>
    <plugins>
      <plugin>
        <groupId>org.mobicents.tools</groupId>
        <artifactId>maven-du-plugin</artifactId>
        <extensions>true</extensions>
        <configuration />
        <executions>
          <execution>
            <phase>install</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>deploy-DU</id>
            <phase>install</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <copy overwrite="true" file="target/${project.build.finalName}.jar" todir="${jboss.home}/server/${node}/deploy" />
              </tasks>
            </configuration>
          </execution>
          <execution>
            <id>undeploy-DU</id>
            <phase>clean</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <delete file="${jboss.home}/server/${node}/deploy/${project.build.finalName}.jar" />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
