<?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.modules</groupId>
    <artifactId>modules-parent</artifactId>
    <version>1.14.28</version>
    <relativePath>../../../parent</relativePath>
  </parent>

  <version>3.1.5</version>
  <artifactId>tts-adapter-acapela</artifactId>
  <packaging>bundle</packaging>

  <name>DAISY Pipeline 2 module :: TTS Adapter for Acapela</name>
  <description>Implementation of the TTS API for Acapela Linux V7.300 and V8.0</description>

  <dependencies>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>common-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>saxon-he</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>tts-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>ds-to-spi-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <!--
          includes jna 4.0.0
      -->
      <groupId>org.daisy.libs</groupId>
      <artifactId>jnaerator</artifactId>
      <scope>provided</scope> <!-- should ideally exclude test -->
    </dependency>
  </dependencies>
  
  <properties>
    <expose-services>
      org.daisy.pipeline.tts.acapela.impl.AcapelaService
    </expose-services>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>META-INF/catalog.xml</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${project.build.directory}/dependency/jnaerator/</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-jna</id>
            <phase>process-sources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/dependency/jnaerator</outputDirectory>
              <artifactItems>
                <artifactItem>
                  <groupId>org.daisy.libs</groupId>
                  <artifactId>jnaerator</artifactId>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <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,
              !org.daisy.common.spi.annotations,
              *
            </Import-Package>
            <Include-Resource>
              src/main/resources/,
              target/dependency/jnaerator/,
            </Include-Resource>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>