<?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>5</version>
    <relativePath />
  </parent>
  
  <groupId>org.daisy.maven</groupId>
  <artifactId>xproc-maven-plugin</artifactId>
  <version>1.0.2</version>
  <packaging>maven-plugin</packaging>
  <name>xproc-maven-plugin</name>
  
  <properties>
    <it.com.xmlcalabash.version>1.1.20-p4-98</it.com.xmlcalabash.version>
    <it.saxon.version>9.8.0.8-1</it.saxon.version>
    <it.jing.version>20151127.0.1</it.jing.version>
    <it.xproc-engine-calabash.version>1.1.3</it.xproc-engine-calabash.version>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-classworlds</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xproc-engine-api</artifactId>
      <version>1.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xprocspec-runner</artifactId>
      <version>1.2.5</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.2</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
      <version>1.7.2</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.0.11</version>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>ds-to-spi-runtime</artifactId>
      <version>1.0.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xproc-engine-calabash</artifactId>
      <version>${it.xproc-engine-calabash.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>com.xmlcalabash</artifactId>
      <version>${it.com.xmlcalabash.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>saxon-he</artifactId>
      <version>${it.saxon.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>jing</artifactId>
      <version>${it.jing.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>1.8</version>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <settingsFile>src/it/settings.xml</settingsFile>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <postBuildHookScript>verify</postBuildHookScript>
          <properties>
            <xproc-maven-plugin.version>${project.version}</xproc-maven-plugin.version>
            <xproc-engine-calabash.version>${it.xproc-engine-calabash.version}</xproc-engine-calabash.version>
            <com.xmlcalabash.version>${it.com.xmlcalabash.version}</com.xmlcalabash.version>
            <saxon.version>${it.saxon.version}</saxon.version>
            <jing.version>${it.jing.version}</jing.version>
          </properties>
          <!--
              We have to configure logging with slf4j-simple because it is chosen over
              logback-classic. We can't remove slf4j-simple from the classpath because it is a
              dependency of Maven itself. The solution is probably to run the tests in a forked
              process, like the surefire-plugin does also.
          -->
          <mavenOpts>
            -Dorg.slf4j.simpleLogger.log.com.xmlcalabash=debug
            -Dorg.slf4j.simpleLogger.log.org.daisy.xprocspec=debug
          </mavenOpts>
          <goals>
            <goal>surefire-report:report</goal>
          </goals>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <pomIncludes>
                <pomInclude>*-calabash/pom.xml</pomInclude>
              </pomIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <scm>
    <tag>v1.0.2</tag>
  </scm>
</project>
