<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>com.carrotsearch.randomizedtesting</groupId>
    <artifactId>randomizedtesting-parent</artifactId>
    <version>2.8.2</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>junit4-maven-plugin-tests</artifactId>
  <name><![CDATA[RandomizedTesting JUnit4 Maven Plugin Tests]]></name>
  <packaging>jar</packaging>

  <properties>
   <maven.deploy.skip>true</maven.deploy.skip>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

    <dependency>
      <groupId>com.carrotsearch.randomizedtesting</groupId>
      <artifactId>randomizedtesting-runner</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>    
      <groupId>com.carrotsearch.randomizedtesting</groupId>
      <artifactId>junit4-maven-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <debug>true</debug>
          <projectsDirectory>src/it</projectsDirectory>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <addTestClassPath>true</addTestClassPath>
          <pomIncludes>
            <pomInclude>**/pom.xml</pomInclude>
          </pomIncludes>
          <pomExcludes>
            <pomExclude>pom.xml</pomExclude>
          </pomExcludes>
          <postBuildHookScript>verify</postBuildHookScript>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <settingsFile>src/it/settings.xml</settingsFile>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
