<?xml version="1.0" encoding="utf-8"?>
<!--
    $Id: pom.xml,v 1.99 2017/11/09 20:34:57 oboehm Exp $

	Project Object Model (POM) for Maven
	If you are behind a proxy try the following command:
		'mvn -Dhttp.proxyHost=10.253.1.158 -Dhttp.proxyPort=8080 validate'
	Instead of 'validate' you can use also another goal. The following goals
	should work (see also iX 2/2006, p.77):
		validate
		generate-sources
		install
	
	Some other useful goals are:
	    jar
	    source:jar
	    source:test-jar
	
	PS: If you want to update the maven plugins use the option -U.

	see http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
	see http://maven.apache.org/pom.htm
	
    (c)reated 13-Mar-07 by ob@aosd.de
	last up$Date: 2017/11/09 20:34:57 $ by $Author: oboehm $
-->
<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">

  <!-- 
      The Basics
      must be set if you want to upload it to the Central Repository
      see http://maven.apache.org/guides/mini/guide-central-repository-upload.html
   -->
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.patterntesting</groupId>
    <artifactId>patterntesting-parent</artifactId>
    <version>2.0.2</version>
  </parent>
  <artifactId>patterntesting-tools</artifactId>
  <packaging>maven-plugin</packaging>
  <name>patterntesting-tools</name>
  <description>PatternTesting Tools (patterntesting-tools) is the container for
    tools around PatternTesting like the Ant extensions and Maven plugin.</description>

  <!-- 
      General Properties
      (see parent POM)
   -->
  <properties>
    <mavenVersion>3.0.5</mavenVersion>
    <mojo.java.target>1.8</mojo.java.target>
    <patterntesting.site.artifact.dir>${patterntesting.site.dir}/tools/</patterntesting.site.artifact.dir>
  </properties>

  <!-- 
	  L I B R A R I E S
	  see http://www.ibiblio.org/maven2/ for available libraries
   -->
  <dependencies>

    <dependency>
      <groupId>org.patterntesting</groupId>
      <artifactId>patterntesting-rt</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.10.1</version>
    </dependency>
    <!-- Maven plugin dependencies -->
    <dependency>
      <groupId>${aspectj.maven.plugin.groupId}</groupId>
      <artifactId>aspectj-maven-plugin</artifactId>
      <version>${aspectj.maven.plugin.version}</version>
      <type>maven-plugin</type>
      <exclusions>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-compat</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-lang</groupId>
          <artifactId>commons-lang</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-validator</groupId>
          <artifactId>commons-validator</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-interpolation</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven.doxia</groupId>
          <artifactId>doxia-sink-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven.doxia</groupId>
          <artifactId>doxia-site-renderer</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-model</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-collections</groupId>
          <artifactId>commons-collections</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.velocity</groupId>
          <artifactId>velocity</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact-manager</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven.wagon</groupId>
          <artifactId>wagon-provider-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-plugin-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-settings</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-digester</groupId>
          <artifactId>commons-digester</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-repository-metadata</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-model-builder</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-classworlds</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact-manager</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${maven.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-annotations</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.22</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-api</artifactId>
      <version>1.13.1</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-impl</artifactId>
      <version>1.13.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-aether-provider</artifactId>
      <version>3.3.9</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.5.2</version>
      <scope>provided</scope>
      <!-- annotations are needed only to build the plugin -->
      <exclusions>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Testing, Mocking -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- needed for testing -->
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>3.3.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.25</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- Build Settings -->
  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.ops4j</groupId>
                    <artifactId>maven-inherit-plugin</artifactId>
                    <versionRange>[1.5,)</versionRange>
                    <goals>
                      <goal>inherit</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!--
          AspectJ compiler
          @see http://www.mail-archive.com/user@mojo.codehaus.org/msg00157.html
          @see http://mail-archives.apache.org/mod_mbox/maven-users/200601.mbox/%3CB39B8F0E-BB20-44DB-96B3-3C7FCB85B594@gmail.com%3E
          @see http://mojo.codehaus.org/aspectj-maven-plugin/differentTestAndCompile.html
       -->
      <plugin>
        <groupId>${aspectj.maven.plugin.groupId}</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <configuration>
          <source>${maven.compile.source}</source>
          <target>${maven.compile.target}</target>
          <complianceLevel>${maven.compile.complianceLevel}</complianceLevel>
          <ajdtBuildDefFile>build.ajproperties</ajdtBuildDefFile>
          <aspectLibraries>
            <aspectLibrary>
              <groupId>org.patterntesting</groupId>
              <artifactId>patterntesting-rt</artifactId>
            </aspectLibrary>
          </aspectLibraries>
        </configuration>
        <executions>
          <execution>
            <id>compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <ajdtBuildDefFile>build.ajproperties</ajdtBuildDefFile>
            </configuration>
          </execution>
          <execution>
            <id>test-compile</id>
            <goals>
              <goal>test-compile</goal>
            </goals>
            <configuration>
              <ajdtBuildDefFile>build.ajproperties</ajdtBuildDefFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- see https://stackoverflow.com/questions/18999401/basic-maven-plugin-project-not-working-mojo-plugin-descriptors-not-generating -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- see http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/AjcTestCase.java</exclude>
          </excludes>
          <!--
              must be switched off till we can setMultiThreaded(true)
              see https://bugs.eclipse.org/bugs/show_bug.cgi?id=319315
           -->
          <forkCount>1</forkCount>
          <reuseForks>true</reuseForks>
        </configuration>
      </plugin>
      <!-- 
          We want to build a tar/zip file with all jars inside.
       -->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/bin.xml</descriptor>
            <descriptor>src/assembly/src.xml</descriptor>
          </descriptors>
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
      </plugin>
      <!-- see http://maven.apache.org/plugins/maven-source-plugin/usage.html -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
      <!-- Enabling the use of FTP -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
      </extension>
    </extensions>
  </build>

  <url>http://patterntesting.org/release/tools/</url>

  <inceptionYear>2002</inceptionYear>

  <!-- see http://maven.apache.org/pom.html#Licenses -->
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>vmassol</id>
      <name>Vincent Massol</name>
      <email>vmassol@pivolis.com</email>
      <organization>Pivolis</organization>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
    <developer>
      <id>ojojo</id>
      <name>Matt Smith</name>
      <email>matt@ojojo.com</email>
      <organization>ojojo</organization>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
    <developer>
      <id>oboehm</id>
      <name>Oliver Boehm</name>
      <email>ob@aosd.de</email>
      <url>http://www.aosd.de/</url>
      <organization>agentes AG</organization>
      <organizationUrl>http://www.agentes.de</organizationUrl>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Shohara Shaikh</name>
      <email></email>
      <organization>KPIT Cummins</organization>
      <roles>
        <role>Java Developer</role>
      </roles>
    </contributor>
  </contributors>

  <scm>
    <connection>scm:git:git://github.com/oboehm/PatternTesting2.git/patterntesting-tools</connection>
    <url>https://github.com/oboehm/PatternTesting2/patterntesting-tools</url>
  </scm>

  <!-- 
      Deployment
      see "Better Builds with Maven", p. 74
      see http://maven.apache.org/plugins/maven-deploy-plugin/
  -->
  <distributionManagement>
    <!--
        Deployment of the Web-Site 
        (try 'mvn site-deploy' to deploy it)
    -->
    <site>
      <id>ftp-patterntesting.org</id>
      <name>PatternTesting Website</name>
      <url>${patterntesting.site.url}/${project.version}/tools/</url>
    </site>
  </distributionManagement>

  <profiles>

    <profile>
      <id>integration-test</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <!-- 
              Allow Integration Tests
              see http://maven.apache.org/plugins/maven-invoker-plugin/
              see http://svn.apache.org/repos/asf/maven/plugins/tags/maven-invoker-plugin-1.5
           -->
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>3.2.0</version>
            <configuration>
              <debug>false</debug>
              <projectsDirectory>src/it</projectsDirectory>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <preBuildHookScript>setup</preBuildHookScript>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <goals>
                <goal>compile</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
