<?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-wkf-wcm</artifactId>
    <version>2.3.12</version>
  </parent>
  <artifactId>exo-ecms-delivery-wkf-wcm-assembly</artifactId>
  <packaging>pom</packaging>
  <name>eXo WCM and WORKFLOW extension Assemblies</name>
  <properties>
    <gatein.working.dir>${basedir}/target</gatein.working.dir>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.exoplatform.tool</groupId>
      <artifactId>exopackage</artifactId>
      <version>${org.exoplatform.exopackage.version}</version>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>kernel.packaging.module</artifactId>
      <version>${org.exoplatform.kernel.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>core.packaging.module</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ws</groupId>
      <artifactId>ws.packaging.module</artifactId>
      <version>${org.exoplatform.ws.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>jcr.packaging.module</artifactId>
      <version>${org.exoplatform.jcr.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.portal</groupId>
      <artifactId>portal.packaging.module</artifactId>
      <version>${org.exoplatform.portal.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>workflow.packaging.module</artifactId>
      <version>${project.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>dms.packaging.module</artifactId>
      <version>${project.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>wcm.packaging.module</artifactId>
      <version>${project.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>wcm.packaging.product</artifactId>
      <version>${project.version}</version>
      <type>js</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-delivery-wcm-server-tomcat</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-ecmdemo-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-core-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-ecmdemo-config</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
       <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-waiportal-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-ecmdemo-rest-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-packaging-wcm-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>
	<dependency><groupId>org.exoplatform.ecms</groupId><artifactId>exo-ecms-packaging-workflow-config</artifactId><version>${project.version}</version><type>jar</type></dependency>
	<dependency><groupId>org.exoplatform.ecms</groupId><artifactId>exo-ecms-packaging-workflow-webapp</artifactId><version>${project.version}</version><type>war</type></dependency>
    <dependency><groupId>c3p0</groupId><artifactId>c3p0</artifactId><version>${c3p0.version}</version><type>jar</type></dependency><!-- 0.9.1.2-->
	<dependency><groupId>org.gatein.wci</groupId><artifactId>wci-exo</artifactId><version>${org.gatein.wci.version}</version><type>jar</type></dependency><!-- 2.0.1-GA-->
	<dependency><groupId>org.exoplatform.jcr</groupId><artifactId>exo.jcr.framework.web</artifactId><version>${org.exoplatform.jcr.version}</version><type>jar</type></dependency><!-- 1.12.6-GA-SNAPSHOT-->
	<dependency><groupId>org.gatein.wci</groupId><artifactId>wci-tomcat6</artifactId><version>${org.gatein.wci.version}</version><type>jar</type></dependency><!-- 2.0.1-GA-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.portlet.dashboard</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.web.portal</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>net.oauth</groupId><artifactId>core</artifactId><version>${net.oauth.version}</version><type>jar</type></dependency><!-- 20080621-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.web.eXoResources</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.portlet.web</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>cglib</groupId><artifactId>cglib</artifactId><version>${cglib.version}</version><type>jar</type></dependency><!-- 2.2-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.portlet.exoadmin</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>commons-pool</groupId><artifactId>commons-pool</artifactId><version>${commons-pool.version}</version><type>jar</type></dependency><!-- 1.2-->
	<dependency><groupId>antlr</groupId><artifactId>antlr</artifactId><version>${antlr.version}</version><type>jar</type></dependency><!-- 2.7.6rc1-->
	<dependency><groupId>commons-dbcp</groupId><artifactId>commons-dbcp</artifactId><version>${commons-dbcp.version}</version><type>jar</type></dependency><!-- 1.2.1-->
	<dependency><groupId>org.gatein.shindig</groupId><artifactId>shindig-social-api</artifactId><version>${org.gatein.shindig.version}</version><type>jar</type></dependency><!-- 1.0-r790473-Patch04-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.web.rest</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>jcr</groupId><artifactId>jcr</artifactId><version>${jcr.version}</version><type>jar</type></dependency><!-- 1.0-->
	<dependency><groupId>org.exoplatform.ws</groupId><artifactId>exo.ws.frameworks.servlet</artifactId><version>${org.exoplatform.ws.version}</version><type>jar</type></dependency><!-- 2.1.6-GA-SNAPSHOT-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.gadgets-server</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>stax</groupId><artifactId>stax-api</artifactId><version>${stax.version}</version><type>jar</type></dependency><!-- 1.0-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.eXoGadgets</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.exoplatform.tool</groupId><artifactId>exo.tool.webunit</artifactId><version>${org.exoplatform.tool.version}</version><type>jar</type></dependency><!-- 1.0.0-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.webui.dashboard</artifactId><version>${org.exoplatform.portal.version}</version><type>jar</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.javassist</groupId><artifactId>javassist</artifactId><version>${org.javassist.version}</version><type>jar</type></dependency><!-- 3.4.GA-->
	<dependency><groupId>html-parser</groupId><artifactId>html-parser</artifactId><version>${html-parser.version}</version><type>jar</type></dependency><!-- 1.6-->
	<dependency><groupId>javax.mail</groupId><artifactId>mail</artifactId><version>${javax.mail.version}</version><type>jar</type></dependency><!-- 1.4.2-->
	<dependency><groupId>org.jvnet.jaxb2.maven2</groupId><artifactId>maven-jaxb2-plugin</artifactId><version>${org.jvnet.jaxb2.maven2.version}</version><type>jar</type></dependency><!-- 0.1-->
	<dependency><groupId>commons-collections</groupId><artifactId>commons-collections</artifactId><version>${commons-collections.version}</version><type>jar</type></dependency><!-- 3.2.1-->
	<dependency><groupId>org.jsecurity</groupId><artifactId>jsecurity</artifactId><version>${org.jsecurity.version}</version><type>jar</type></dependency><!-- 0.9.0-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.server.tomcat.plugin</artifactId><version>${org.exoplatform.portal.version}</version><type>jar</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.chromattic</groupId><artifactId>chromattic.core</artifactId><version>${chromattic.version}</version><type>jar</type></dependency><!-- 1.0.4-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.component.management</artifactId><version>${org.exoplatform.portal.version}</version><type>jar</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
	<dependency><groupId>org.gatein.pc</groupId><artifactId>pc-controller</artifactId><version>${org.gatein.pc.version}</version><type>jar</type></dependency><!-- 2.1.1-GA-->
	<dependency><groupId>org.exoplatform.portal</groupId><artifactId>exo.portal.starter.war</artifactId><version>${org.exoplatform.portal.version}</version><type>war</type></dependency><!-- 3.1.6-PLF-SNAPSHOT-->
    <dependency><groupId>org.hsqldb</groupId><artifactId>hsqldb</artifactId><version>${org.hsqldb.version}</version><type>jar</type></dependency>
    <dependency><groupId>org.slf4j</groupId><artifactId>slf4j-jdk14</artifactId><version>${org.slf4j.version}</version><type>jar</type></dependency>
    <dependency><groupId>org.gatein.shindig</groupId><artifactId>shindig-social-api</artifactId><version>${org.gatein.shindig.version}</version><type>jar</type></dependency>
    <dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>${org.apache.httpcomponents.version}</version><type>jar</type></dependency><!-- 4.0-->
    <dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>${com.google.guava.version}</version><type>jar</type></dependency><!-- r07-->
    <dependency><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>${commons-codec.version}</version><type>jar</type></dependency><!-- 1.4-->
    <dependency><groupId>org.w3c</groupId><artifactId>sac</artifactId><version>${org.w3c.sac.version}</version><type>jar</type></dependency>
    <dependency><groupId>batik</groupId><artifactId>batik-util</artifactId><version>${org.apache.batik-util.version}</version><type>jar</type></dependency>
    <!-- xCMIS dependencies -->
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-renditions</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-restatom</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-search-model</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-search-parser-cmis</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-search-service</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.xcmis</groupId>
      <artifactId>xcmis-spi</artifactId>
      <version>${org.xcmis.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-ext-xcmis-sp</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-client</artifactId>
      <version>${abdera.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-core</artifactId>
      <version>${abdera.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-i18n</artifactId>
      <version>${abdera.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-parser</artifactId>
      <version>${abdera.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-server</artifactId>
      <version>${abdera.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr-runtime</artifactId>
      <version>${org.antlr.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-api</artifactId>
      <version>${axiom.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-impl</artifactId>
      <version>${axiom.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>${jaxen.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-regex</artifactId>
      <version>${lucene-regex.version}</version>
      <type>jar</type>
    </dependency>
    <dependency><groupId>org.exoplatform.commons</groupId><artifactId>exo.platform.commons.component.product</artifactId><version>${org.exoplatform.commons.version}</version><type>jar</type></dependency><!-- 1.1.2-GA-SNAPSHOT-->
    <dependency><groupId>org.exoplatform.commons</groupId><artifactId>exo.platform.commons.component.upgrade</artifactId><version>${org.exoplatform.commons.version}</version><type>jar</type></dependency><!-- 1.1.2-GA-SNAPSHOT-->
    <dependency><groupId>caja</groupId><artifactId>json_simple</artifactId><version>${caja.version}</version><type>jar</type></dependency><!-- r1-->
    <dependency><groupId>javax.resource</groupId><artifactId>connector-api</artifactId><version>${javax.resource.version}</version><type>jar</type></dependency><!-- 1.5-->
    <dependency><groupId>org.jboss</groupId><artifactId>jbossxb</artifactId><version>${org.jbossxb.version}</version><type>jar</type></dependency><!-- 2.0.1.GA-->
    <dependency><groupId>org.jboss</groupId><artifactId>jboss-common-core</artifactId><version>${org.jbosscore.version}</version><type>jar</type></dependency><!-- 2.2.9.GA-->    
    <dependency><groupId>org.apache.pdfbox</groupId><artifactId>fontbox</artifactId><version>${org.apache.pdfbox.version}</version><type>jar</type></dependency>    
    <dependency><groupId>org.apache.pdfbox</groupId><artifactId>pdfbox</artifactId><version>${org.apache.pdfbox.version}</version><type>jar</type></dependency>
    <dependency><groupId>org.openoffice</groupId><artifactId>unoil</artifactId><version>${openoffice.version}</version><type>jar</type></dependency><!-- 3.0.1-->
    <dependency><groupId>org.openoffice</groupId><artifactId>juh</artifactId><version>${openoffice.version}</version><type>jar</type></dependency><!-- 3.0.1-->
    <dependency><groupId>org.openoffice</groupId><artifactId>jurt</artifactId><version>${openoffice.version}</version><type>jar</type></dependency><!-- 3.0.1-->
    <dependency><groupId>org.imgscalr</groupId><artifactId>imgscalr-lib</artifactId><version>${org.imgscalr.version}</version><type>jar</type></dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- check-out exobuild -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-dependencies</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <overWriteSnapshots>true</overWriteSnapshots>
              <artifactItems>
                <artifactItem>
                  <groupId>org.exoplatform.tool</groupId>
                  <artifactId>exopackage</artifactId>
                  <type>zip</type>
                  <outputDirectory>target/exopackage</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>copy-dependencies</id>
            <phase>compile</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <includeTypes>js</includeTypes>
              <stripVersion>true</stripVersion>
              <outputDirectory>${project.build.directory}/exopackage-conf</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>pkg-tomcat</id>
      <activation>
        <property>
          <name>!skip.wkf</name>
        </property>
      </activation>
      <build>
        <finalName>eXoWCM-Workflow-${project.version}</finalName>
        <plugins>
          <!-- Ensure your environment is correctly setup -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>tomcat-check-environment-ready</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireProperty>
                      <property>exo.projects.directory.dependencies</property>
                      <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
                    </requireProperty>
                    <requireProperty>
                      <property>exo.projects.app.tomcat.version</property>
                      <message>"You must define the property exo.projects.app.tomcat.version to give the name of the directory where is stored tomcat"</message>
                    </requireProperty>
                    <requireFilesExist>
                      <files>
                        <file>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}/</file>
                      </files>
                      <message>"The following Tomcat directory doesn't exist : ${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
                    </requireFilesExist>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- run exo build -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>tomcat-exopackage</id>
                <phase>package</phase>
                <configuration>
                  <executable>java</executable>
                  <workingDirectory>${basedir}</workingDirectory>
                  <arguments>
                    <argument>-Dexo.package.home=${basedir}/target/exopackage</argument>
                    <argument>-Dexo.current.dir=${basedir}</argument>
                    <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
                    <argument>-Dexo.conf.dir=${basedir}/target/exopackage-conf</argument>
                    <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
                    <!--argument>-Dexo.src.dir=NONE</argument-->
                    <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument>
                    <!-- to get the server ref install -->
                    <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
                    <argument>-Dclean.server=${exo.projects.app.tomcat.version}</argument>
                    <argument>-Dexo.m2.home=${maven.home}</argument>
                    <argument>-Dorg.exoplatform.portal.version=${org.exoplatform.portal.version}</argument>
                    <argument>-Xshare:auto</argument>
                    <argument>-Xms64m</argument>
                    <argument>-Xmx1024m</argument>
                    <argument>-XX:MaxPermSize=512m</argument>
                    <argument>-classpath</argument>
                    <argument>${basedir}/target/exopackage/lib/js.jar</argument>
                    <argument>org.mozilla.javascript.tools.shell.Main</argument>
                    <argument>${basedir}/target/exopackage/javascript/eXo/eXo.js</argument>
                    <argument>exobuild</argument>
                    <argument>--product=wcm</argument>
                    <argument>--deploy=tomcat</argument>
					<argument>--enable-workflow=${workflowEngine}</argument>
                  </arguments>
                </configuration>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>arc-tomcat</id>
      <activation>
        <property>
          <name>!skip.archive</name>
        </property>
      </activation>      
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>tomcat-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>src/main/assembly/tomcat-zip.xml</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
