<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>

  <groupId>com.carrotsearch.randomizedtesting</groupId>
  <artifactId>junit4-maven-plugin-tests</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name><![CDATA[RandomizedTesting JUnit4 Maven Plugin Tests]]></name>
  <packaging>jar</packaging>

  <prerequisites>
    <maven>3.0.2</maven>
  </prerequisites>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>    
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.carrotsearch.randomizedtesting</groupId>
      <artifactId>randomizedtesting-runner</artifactId>
      <version>@project.version@</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.simpleframework</groupId>
      <artifactId>simple-xml</artifactId>
      <version>2.6.2</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.carrotsearch.randomizedtesting</groupId>
        <artifactId>junit4-maven-plugin</artifactId>
        <version>@project.version@</version>
        <executions>
          <execution>
            <id>junit4-tests</id>
            <goals>
              <goal>junit4</goal>
            </goals>
            <configuration>
              <heartbeat>10</heartbeat>
              <jvmOutputAction>pipe,ignore</jvmOutputAction>
              <leaveTemporary>true</leaveTemporary>
              <classpathDependencyExcludes>
                <dependency>org.simpleframework:simple-xml</dependency>
              </classpathDependencyExcludes>

              <argLine>
                -DargLine.property=foobar
                -DargLine.property2=foobar
              </argLine>

              <listeners>
                <report-text
                    showThrowable="true" 
                    showStackTraces="true" 
                    showOutput="always" 

                    showStatusOk="true"
                    showStatusError="true"
                    showStatusFailure="true"
                    showStatusIgnored="true"

                    showSuiteSummary="false"
                />              
              </listeners>

              <assertions>
                <enable package="com.carrotsearch.ant.tasks.junit4.tests.sub1"/>
              </assertions>

              <balancers>
                <execution-times>
                  <fileset dir="${project.build.directory}" includes="hints*.log" />
                </execution-times>
              </balancers>
              
              <includes>
                <include>**/Test0*.class</include>
              </includes>
              <excludes>
                <exclude>**/Buhu*</exclude>
              </excludes>
              
              <verbatim>
                <jvmarg line="-Dverbatim.section=foobar" />
              </verbatim>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
