<?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.2</version>
    <relativePath />
  </parent>
  
  <groupId>org.daisy.pipeline.modules</groupId>
  <artifactId>dtbook-to-odt</artifactId>
  <version>1.0.0</version>
  <packaging>bundle</packaging>
  
  <name>DAISY Pipeline 2 module :: DTBook to ODT</name>
  
  <!--
      TODO: this should be in parent
  -->
  <!--<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.daisy.pipeline</groupId>
        <artifactId>framework-bom</artifactId>
        <version>1.8</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.daisy.pipeline.modules</groupId>
        <artifactId>common-utils-aggregator</artifactId>
        <version>1.8</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.daisy.pipeline.modules</groupId>
        <artifactId>scripts-aggregator</artifactId>
        <version>1.8</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.daisy.pipeline.modules</groupId>
        <artifactId>script-utils-aggregator</artifactId>
        <version>1.8</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.daisy.xprocspec</groupId>
        <artifactId>xprocspec</artifactId>
        <version>1.1.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.daisy.maven</groupId>
        <artifactId>xprocspec-runner</artifactId>
        <version>1.0.0</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.daisy.maven</groupId>
        <artifactId>xproc-engine-daisy-pipeline</artifactId>
        <version>1.8.1-SNAPSHOT</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.daisy.pipeline</groupId>
        <artifactId>pax-exam-helper</artifactId>
        <version>1.8-SNAPSHOT</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>dtbook-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>odt-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>image-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>asciimath-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>fileset-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>file-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>common-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>html-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>zip-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>mediatype-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>validation-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>dtbook-validator</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xproc-engine-daisy-pipeline</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.xprocspec</groupId>
      <artifactId>xprocspec</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.maven</groupId>
      <artifactId>xprocspec-runner</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.7.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>pax-exam-helper</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>-->
  
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>templates/**</exclude>
          <exclude>xml/dtbook-to-odt.xpl</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>xml/dtbook-to-odt.xpl</include>
        </includes>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>target/generated-resources</directory>
        <includes>
          <include>templates/**</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>shell-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <id>generate-ott</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>shell</goal>
            </goals>
            <configuration>
              <workDir>${project.basedir}</workDir>
              <chmod>true</chmod>
              <script>
                #!/bin/sh
                zip_odt() {
                  cd $1
                  zip -0 -X $2 mimetype
                  zip -r $2 * -x mimetype
                }
                rm -rf target/generated-resources/templates
                mkdir -p target/generated-resources/templates
                for template in $(ls src/main/resources/templates); do
                  (zip_odt src/main/resources/templates/${template} $(pwd)/target/generated-resources/templates/${template})
                done
              </script>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--<plugin>
        <groupId>org.ops4j.pax.exam</groupId>
        <artifactId>maven-paxexam-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-depends-file</id>
            <goals>
              <goal>generate-depends-file</goal>
            </goals>
          </execution>
        </executions>
      </plugin>-->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <testExcludes>
                <exclude>DtbookToOdtTest.java</exclude>
              </testExcludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--<plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/DtbookToOdtTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>-->
    </plugins>
  </build>
  

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