<?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">
  <parent>
    <artifactId>maven-parent-pom</artifactId>
    <groupId>org.exoplatform</groupId>
    <version>14</version>
    <relativePath>pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.exoplatform.platform</groupId>
  <artifactId>addons-manager</artifactId>
  <name>eXo Platform - Add-ons Manager</name>
  <version>1.1.0-RC08</version>
  <description>Command line utility to manage Platform add-ons</description>
  <scm>
    <connection>scm:git:git://github.com/exoplatform/addons-manager.git</connection>
    <developerConnection>scm:git:git@github.com:exoplatform/addons-manager.git</developerConnection>
    <tag>1.1.0-RC08</tag>
  </scm>
  <build>
    <sourceDirectory>src/main/groovy</sourceDirectory>
    <testSourceDirectory>src/test/groovy</testSourceDirectory>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/*.properties</exclude>
        </excludes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <ut.verbose>${ut.verbose}</ut.verbose>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
          <execution>
            <id>site</id>
            <phase>pre-site</phase>
            <goals>
              <goal>groovydoc</goal>
            </goals>
            <configuration>
              <groovydocOutputDirectory>${project.reporting.outputDirectory}/gapidocs</groovydocOutputDirectory>
              <scope>public</scope>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformers>
            <transformer>
              <manifestEntries>
                <Main-Class>org.exoplatform.platform.am.AddonsManager</Main-Class>
                <Date>${maven.build.timestamp}</Date>
                <Implementation-URL>${project.url}</Implementation-URL>
                <SCM-URL>${project.scm.connection}</SCM-URL>
                <SCM-Revision>${buildNumber}</SCM-Revision>
                <Specification-Title>${exo.product.name}</Specification-Title>
                <Specification-Version>${parsedVersion.majorVersion}.0</Specification-Version>
                <Specification-Vendor>${project.organization.name}</Specification-Vendor>
                <Implementation-Title>${project.name}</Implementation-Title>
                <Implementation-Version>${project.version}</Implementation-Version>
                <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
              </manifestEntries>
            </transformer>
            <transformer />
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>create-zip-package</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assemblies/bundle.xml</descriptor>
              </descriptors>
              <appendAssemblyId>false</appendAssemblyId>
              <attach>true</attach>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <testResources>
          <testResource>
            <targetPath>${it.dataDirPath}</targetPath>
            <filtering>true</filtering>
            <directory>${project.basedir}/src/test/data</directory>
            <includes>
              <include>**/*.json</include>
              <include>**/*.xml</include>
            </includes>
          </testResource>
          <testResource>
            <targetPath>${it.dataDirPath}</targetPath>
            <directory>${project.basedir}/src/test/data</directory>
            <excludes>
              <exclude>**/*.json</exclude>
            </excludes>
          </testResource>
        </testResources>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>reserve-network-port</id>
                <phase>initialize</phase>
                <goals>
                  <goal>reserve-network-port</goal>
                </goals>
                <configuration>
                  <portNames>
                    <portName>it.webServerHttpPort</portName>
                  </portNames>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>prepare-integration-tests</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <includeScope>test</includeScope>
                  <includeTypes>zip</includeTypes>
                  <outputDirectory>${it.workingDirPath}</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start-tomcat</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>run-war-only</goal>
                </goals>
                <configuration>
                  <fork>true</fork>
                </configuration>
              </execution>
              <execution>
                <id>stop-tomcat</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>shutdown</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <ignorePackaging>true</ignorePackaging>
              <serverXml>${it.dataDirPath}/server.xml</serverXml>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <it.dataDirPath>${it.dataDirPath}</it.dataDirPath>
                <it.workingDirPath>${it.workingDirPath}</it.workingDirPath>
                <it.jacocoAgent>${argLine}</it.jacocoAgent>
                <it.platformVersion>${it.platform.version}</it.platformVersion>
                <it.testedArtifactPath>${project.build.directory}/${project.build.finalName}.jar</it.testedArtifactPath>
                <it.verbose>${it.verbose}</it.verbose>
                <it.webServerHttpPort>${it.webServerHttpPort}</it.webServerHttpPort>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>${it.platform.groupId}</groupId>
          <artifactId>${it.platform.artifactId}</artifactId>
          <version>${it.platform.version}</version>
          <type>zip</type>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>platform-community-tomcat-its</id>
      <properties>
        <it.platform.artifactId>plf-community-tomcat-standalone</it.platform.artifactId>
        <it.platform.groupId>org.exoplatform.platform.distributions</it.platform.groupId>
      </properties>
    </profile>
    <profile>
      <id>platform-enterprise-tomcat-its</id>
      <properties>
        <it.platform.artifactId>plf-enterprise-tomcat-standalone</it.platform.artifactId>
        <it.platform.groupId>com.exoplatform.platform.distributions</it.platform.groupId>
      </properties>
    </profile>
    <profile>
      <id>platform-enterprise-jbosseap-its</id>
      <properties>
        <it.platform.artifactId>plf-enterprise-jbosseap-standalone</it.platform.artifactId>
        <it.platform.groupId>com.exoplatform.platform.distributions</it.platform.groupId>
      </properties>
    </profile>
    <profile>
      <id>coverage</id>
      <properties>
        <forkCount>1</forkCount>
      </properties>
    </profile>
    <profile>
      <id>verbose-tests</id>
      <properties>
        <ut.verbose>true</ut.verbose>
        <it.verbose>true</it.verbose>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-groovydoc</artifactId>
      <version>2.3.6</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>groovy-templates</artifactId>
          <groupId>org.codehaus.groovy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
      <version>3.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.objenesis</groupId>
      <artifactId>objenesis</artifactId>
      <version>2.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>0.7-groovy-2.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-dep</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>groovy-all</artifactId>
          <groupId>org.codehaus.groovy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <it.platform.version>4.4.0-RC02</it.platform.version>
    <it.platform.artifactId>plf-community-tomcat-standalone</it.platform.artifactId>
    <jira.project.key>AM</jira.project.key>
    <hamcrest-core.version>1.3</hamcrest-core.version>
    <objenesis.version>2.1</objenesis.version>
    <it.platform.groupId>org.exoplatform.platform.distributions</it.platform.groupId>
    <it.verbose>false</it.verbose>
    <cglib.version>3.1</cglib.version>
    <maven.compiler.source>1.6</maven.compiler.source>
    <junit.version>4.11</junit.version>
    <it.workingDirPath>${project.build.directory}/integration-tests</it.workingDirPath>
    <groovy.version>2.3.6</groovy.version>
    <jenkins.job.name>addons-manager-master-ci</jenkins.job.name>
    <spock-core.version>0.7-groovy-2.0</spock-core.version>
    <ut.verbose>false</ut.verbose>
    <maven.compiler.target>1.6</maven.compiler.target>
    <it.dataDirPath>${project.build.directory}/test-data</it.dataDirPath>
    <jline.version>2.12</jline.version>
    <aether.version>1.1.0</aether.version>
    <jcommander.version>1.35</jcommander.version>
  </properties>
</project>

