<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>org.eclipse.mylyn-parent</artifactId>
    <groupId>org.eclipse.mylyn</groupId>
    <version>3.8.2-SNAPSHOT</version>
    <relativePath>../org.eclipse.mylyn-parent</relativePath>
  </parent>
  <artifactId>org.eclipse.mylyn.tests</artifactId>
  <version>3.8.2-SNAPSHOT</version>
  <packaging>eclipse-test-plugin</packaging>
  <properties>
    <test.integration.suite>org.eclipse.mylyn.tests.AllTests</test.integration.suite>
    <test.all.skip>${test.skip}</test.all.skip>
    <test.integration.skip>${test.all.skip}</test.integration.skip>
  </properties>
  <profiles>
    <profile>
      <id>localonly</id>
      <properties>
        <test.integration.suite>org.eclipse.mylyn.tests.AllLocalTests</test.integration.suite>
      </properties>
    </profile>
    <profile>
      <id>heartbeat</id>
      <properties>
        <test.integration.suite>org.eclipse.mylyn.tests.AllHeartbeatTests</test.integration.suite>
      </properties>
    </profile>
  </profiles>
  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-surefire-plugin</artifactId>
        <version>${tycho-version}</version>
        <configuration>
          <skip>${test.integration.skip}</skip>
          <testSuite>${project.artifactId}</testSuite>
          <testClass>${test.integration.suite}</testClass>
          <explodedBundles>
            <explodedBundle>org.eclipse.mylyn.bugzilla.tests</explodedBundle>
          </explodedBundles>
          <dependencies>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.sdk.feature.group</artifactId>
              <version>${platform-version}</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.mylyn.sdk_feature.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.mylyn.context.sdk.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.mylyn.docs.sdk.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.cdt.mylyn.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.mylyn.gerrit.feature.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
            <dependency>
              <type>p2-installable-unit</type>
              <artifactId>org.eclipse.mylyn.hudson.feature.group</artifactId>
              <version>0.0.0</version>
            </dependency>
          </dependencies>		  
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <version>1.0-beta-3</version>
        <executions>
          <execution>
            <phase>post-integration-test</phase>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformationSets>
            <!-- append @x.y.z to repository test cases to differentiate test fixtures -->
            <transformationSet>
              <dir>${project.build.directory}/surefire-reports</dir>
              <outputDir>${project.build.directory}/surefire-reports</outputDir>
              <includes>
                <include>*.xml</include>
              </includes>
              <!-- map to different file extensions since overriding source
                   file does not work -->
              <fileMappers>
                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                  <targetExtension>.tmp</targetExtension>
                </fileMapper>
              </fileMappers>
              <stylesheet>${basedir}/test-fixture.xsl</stylesheet>
            </transformationSet>
            <!-- append @ex.y to all test cases to differentiate target platform -->
            <transformationSet>
              <dir>${project.build.directory}/surefire-reports</dir>
              <outputDir>${project.build.directory}/surefire-reports</outputDir>
              <stylesheet>${basedir}/test-suite.xsl</stylesheet>
              <includes>
                <include>*.tmp</include>
              </includes>
              <fileMappers>
                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                  <targetExtension>.xml</targetExtension>
                </fileMapper>
              </fileMappers>
              <!--
                  <parameters>
                  <parameter>
                  <name>append</name>
                  <value>${mylyn-test-append}</value>
                  </parameter>
                  </parameters>
              -->
            </transformationSet>
          </transformationSets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-source-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
