<?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/xsd/maven-4.0.0.xsd">
  
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.daisy</groupId>
    <artifactId>daisy</artifactId>
    <version>4</version>
    <relativePath />
  </parent>
  
  <groupId>org.daisy.pipeline</groupId>
  <artifactId>pax-exam-helper</artifactId>
  <version>2.3.2</version>
  <packaging>bundle</packaging>
  
  <name>DAISY Pipeline 2 :: Pax Exam Helper</name>
  
  <properties>
    <felix.version>4.4.1</felix.version>
    <pax-exam.version>3.3.0</pax-exam.version>
    <pax-url.version>1.6.0</pax-url.version>
    <junit.version>4.11</junit.version>
    <slf4j.version>1.6.3</slf4j.version>
    <logback.version>0.9.30</logback.version>
    <aether.version>1.13.1</aether.version>
    <maven.version>3.0.4</maven.version>
    <wagon.version>2.2</wagon.version>
    <xspec-runner.version>1.0.2</xspec-runner.version>
    <xprocspec.version>1.2.0</xprocspec.version>
    <xprocspec-runner.version>1.1.0</xprocspec-runner.version>
    <xproc-engine-daisy-pipeline.version>1.10.2</xproc-engine-daisy-pipeline.version>
    <framework.version>1.10.4</framework.version>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-api</artifactId>
      <version>${aether.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-util</artifactId>
      <version>${aether.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-connector-wagon</artifactId>
      <version>${aether.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-aether-provider</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-provider-api</artifactId>
      <version>${wagon.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-http</artifactId>
      <version>${wagon.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-file</artifactId>
      <version>${wagon.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings-builder</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam</artifactId>
      <version>${pax-exam.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.main</artifactId>
      <version>${felix.version}</version>
      <scope>runtime</scope>
    </dependency>
    <!--
        Using the forked container can apparently result in the Surefire error "The forked VM
        terminated without properly saying goodbye". Setting forkCount to 0 in Surefire doesn't help
        because it results in the error "java.net.MalformedURLException: unknown protocol:
        link". Using the native container does fix the problem. Note that according to the Pax Exam
        documentation the native container could result in classloader issues, but fortunately this
        is not the case for us. Also note that the forked container has better isolation and
        resembles better a production environment. We should therefore also try to run tests with
        the forked container.
        
        See https://ops4j1.jira.com/wiki/display/PAXEXAM3/OSGi+Containers.
    -->
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <!-- <artifactId>pax-exam-container-forked</artifactId> -->
      <artifactId>pax-exam-container-native</artifactId>
      <version>${pax-exam.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.url</groupId>
      <artifactId>pax-url-reference</artifactId>
      <version>${pax-url.version}</version>
     <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.url</groupId>
      <artifactId>pax-url-wrap</artifactId>
      <version>${pax-url.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-junit4</artifactId>
      <version>${pax-exam.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-link-mvn</artifactId>
      <version>${pax-exam.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <version>1</version>
      <scope>runtime</scope>
    </dependency>
    <!--
        test dependencies for integration tests
    -->
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xspec-runner</artifactId>
      <version>${xspec-runner.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xproc-engine-daisy-pipeline</artifactId>
      <version>${xproc-engine-daisy-pipeline.version}</version>
      <scope>test</scope>
      <!--
          xproc-engine-daisy-pipeline 1.10 depends on various log libraries which may mess up the test log
      -->
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-jdk14</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>jcl-over-slf4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>log4j-over-slf4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.daisy.xprocspec</groupId>
      <artifactId>xprocspec</artifactId>
      <version>${xprocspec.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xprocspec-runner</artifactId>
      <version>${xprocspec-runner.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>1.9.1</version>
            </dependency>
          </dependencies>
          <configuration>
            <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <logback.configurationFile>${project.basedir}/src/test/resources/config-logback.xml</logback.configurationFile>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <debug>true</debug>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <settingsFile>src/it/settings.xml</settingsFile>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <postBuildHookScript>verify</postBuildHookScript>
              <properties>
                <pax-exam-helper.version>${project.version}</pax-exam-helper.version>
                <xspec-runner.version>${xspec-runner.version}</xspec-runner.version>
                <xprocspec.version>${xprocspec.version}</xprocspec.version>
                <xprocspec-runner.version>${xprocspec-runner.version}</xprocspec-runner.version>
                <xproc-engine-daisy-pipeline.version>${xproc-engine-daisy-pipeline.version}</xproc-engine-daisy-pipeline.version>
                <framework.version>${framework.version}</framework.version>
                <org.ops4j.pax.url.mvn.localRepository>${project.build.directory}/local-repo</org.ops4j.pax.url.mvn.localRepository>
                <org.daisy.org.ops4j.pax.url.mvn.settings>${basedir}/src/it/settings.xml</org.daisy.org.ops4j.pax.url.mvn.settings>
              </properties>
              <goals>
                <goal>clean</goal>
                <goal>test</goal>
              </goals>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <scm>
    <tag>pax-exam-helper-2.3.2</tag>
  </scm>
</project>
