<?xml version="1.0" encoding="UTF-8"?>
<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>
  <parent>
    <groupId>org.exoplatform.ecms</groupId>
    <artifactId>exo-ecms-delivery-wcm</artifactId>
    <version>2.3.12</version>
  </parent>
  <artifactId>exo-ecms-delivery-wcm-jboss-package</artifactId>
  <packaging>pom</packaging>
  <name>eXo WCM EARs for JBoss</name>
  <dependencies>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-wcm-ear</artifactId>
      <version>${project.version}</version>
      <type>ear</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-ecmdemo-ear</artifactId>
      <version>${project.version}</version>
      <type>ear</type>
    </dependency>
  </dependencies>
  <build>
    <finalName>eXoContent-${project.version}-jboss-package</finalName>
    <plugins>
    
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <executions>
              <!-- Download and unpack the webapps and libs -->
              <execution>
                  <id>wcm-ecmdemo-ear</id>
                  <phase>process-resources</phase>
                  <goals>
                      <goal>copy</goal>
                  </goals>
                  <configuration>
                      <artifactItems>
    <artifactItem>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-wcm-ear</artifactId>
      <version>${project.version}</version>
      <type>ear</type>
      <outputDirectory>${project.build.directory}/distribution</outputDirectory>
      <destFileName>gatein-wcm-extension-${project.version}.ear</destFileName>
    </artifactItem>
    <artifactItem>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-ecmdemo-ear</artifactId>
      <version>${project.version}</version>
      <type>ear</type>
      <outputDirectory>${project.build.directory}/distribution</outputDirectory>
      <destFileName>gatein-ecmdemo-portal-${project.version}.ear</destFileName>
    </artifactItem>
                      </artifactItems>
                  </configuration>
              </execution>
            </executions>
        </plugin>
    
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>jboss-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/jboss-zip.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
