<?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.pipeline</groupId>
    <artifactId>framework-parent</artifactId>
    <version>1.13.0</version>
    <relativePath>../parent</relativePath>
  </parent>

  <artifactId>calabash-adapter</artifactId>
  <version>3.0.2</version>
  <packaging>bundle</packaging>

  <name>DAISY Pipeline 2 :: Calabash adapter for the XProc API</name>

  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>com.xmlcalabash</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>saxon-he</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>common-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>framework-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>saxon-adapter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>xproc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>ds-to-spi-runtime</artifactId>
      <scope>provided</scope>
    </dependency>
    <!--
        runtime dependencies (for javax.xml.transform.URIResolver)
    -->
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>modules-registry</artifactId>
      <scope>runtime</scope>
    </dependency>
    <!--
        runtime dependencies for com.xmlcalabash (OSGi) (FIXME: move to org.daisy.libs:com.xmlcalabash)
    -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient-osgi</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore-osgi</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>jing</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <!--
        test dependencies
    -->
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>framework-volatile</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>logging-appender</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.build</groupId>
      <artifactId>modules-test-helper</artifactId>
      <version>1.0.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>framework-persistence</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>persistence-derby</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.gemini.jpa</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.gemini</groupId>
      <artifactId>org.apache.derby</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.gemini</groupId>
      <artifactId>org.eclipse.gemini.dbaccess.derby</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.gemini</groupId>
      <artifactId>org.eclipse.gemini.dbaccess.util</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>javax.persistence</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.asm</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.antlr</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.jpa</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Import-Package>
              net.sf.saxon.*;version="${saxon.versionRange}",
              !org.daisy.common.spi,
              *,
              etc
            </Import-Package>
            <_dsannotations>
              org.daisy.common.xproc.calabash.impl.CalabashXProcEngine,
              org.daisy.common.xproc.calabash.impl.DynamicXProcConfigurationFactory
            </_dsannotations>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>bundle-before-test</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!--
      <plugin>
        <groupId>org.daisy.pipeline.build</groupId>
        <artifactId>modules-build-helper</artifactId>
        <version>2.3.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>process-test-catalog</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>process-test-catalog</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      -->
      <plugin>
        <groupId>org.ops4j.pax.exam</groupId>
        <artifactId>maven-paxexam-plugin</artifactId>
        <version>1.2.4</version>
        <executions>
          <execution>
            <id>generate-depends-file</id>
            <goals>
              <goal>generate-depends-file</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <pax.exam.logging>none</pax.exam.logging>
          </systemPropertyVariables>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.daisy.pipeline.build</groupId>
        <artifactId>ds-to-spi-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-spi-classes</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate-spi-classes</goal>
            </goals>
            <configuration>
              <includes>
                org.daisy.common.xproc.calabash.impl.CalabashXProcEngine,
                org.daisy.common.xproc.calabash.impl.DynamicXProcConfigurationFactory
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
