<?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.modules</groupId>
  <artifactId>modules-parent</artifactId>
  <version>1.6</version>
  <packaging>pom</packaging>

  <name>DAISY Pipeline 2 :: Modules Parent POM</name>
  <description>The DAISY Pipeline 2 modules provide scripts for automated processing of various digital formats efficiently and economically. It intends to facilitate the production and maintenance of accessible content for people with print disabilities.</description>
  <url>http://www.daisy.org/pipeline2</url>
  <inceptionYear>2010</inceptionYear>
  <organization>
    <name>The DAISY Consortium</name>
    <url>http://www.daisy.org/</url>
  </organization>
  <licenses>
    <license>
      <name>GNU Lesser General Public License, Version 3</name>
      <url>http://www.gnu.org/copyleft/lesser.html</url>
      <distribution>manual</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>rdeltour</id>
      <name>Romain Deltour</name>
      <email>rdeltour@gmail.com</email>
      <organization>DAISY Consortium</organization>
      <organizationUrl>http://www.daisy.org/</organizationUrl>
      <roles>
        <role>Project Lead</role>
        <role>Developer</role>
      </roles>
      <timezone>UTC+01:00</timezone>
    </developer>
    <developer>
      <id>marisa.demeglio</id>
      <name>Marisa DeMeglio</name>
      <email>marisa.demeglio@gmail.com</email>
      <organization>DAISY Consortium</organization>
      <organizationUrl>http://www.daisy.org/</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>UTC-08:00</timezone>
    </developer>
    <developer>
      <id>capitan.cambio</id>
      <name>Javier Asensio Cubero</name>
      <email>capitan.cambio@gmail.com</email>
      <organization>DAISY Consortium</organization>
      <organizationUrl>http://www.daisy.org/</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>UTC</timezone>
    </developer>
    <developer>
      <id>josteinaj</id>
      <name>Jostein Austvik Jacobsen</name>
      <email>josteinaj@gmail.com</email>
      <organization>Norwegian Library of Talking Books and Braille</organization>
      <organizationUrl>http://www.nlb.no/</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>UTC+01:00</timezone>
    </developer>
    <developer>
      <id>bertfrees</id>
      <name>Bert Frees</name>
      <email>bertfrees@gmail.com</email>
      <organization>SBS - Schweizerische Bibliothek für Blinde, Seh- und Lesebehinderte</organization>
      <organizationUrl>http://sbs.ch/</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>UTC+01:00</timezone>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>DAISY Pipeline Developers</name>
      <subscribe>http://groups.google.com/group/daisy-pipeline-dev/subscribe</subscribe>
      <unsubscribe>daisy-pipeline-dev+unsubscribe@googlegroups.com</unsubscribe>
      <post>daisy-pipeline-dev@googlegroups.com</post>
      <archive>http://groups.google.com/group/daisy-pipeline-dev</archive>
    </mailingList>
  </mailingLists>

  <issueManagement>
    <system>Google Code Issue Tracker</system>
    <url>http://code.google.com/p/daisy-pipeline/issues/list</url>
  </issueManagement>

  <properties>
    <java.version>1.7</java.version>
    <saxon.version>9.4</saxon.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
        </configuration>
        <inherited>false</inherited>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.daisy.pipeline.build</groupId>
          <artifactId>modules-build-helper</artifactId>
          <version>2.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[2.4,)</versionRange>
                    <goals>
                      <goal>unpack</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-patch-plugin</artifactId>
                    <versionRange>[1.1.1,)</versionRange>
                    <goals>
                      <goal>apply</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins </groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <versionRange>[1.8.1,) </versionRange>
                    <goals>
                      <goal>checkout</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <versionRange>[2.5.0,)</versionRange>
                    <goals>
                      <goal>bundle</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <versionRange>[1.2,)</versionRange>
                    <goals>
                      <goal>generate-depends-file</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.ops4j.pax.exam</groupId>
                    <artifactId>maven-paxexam-plugin</artifactId>
                    <versionRange>[1.2.4,)</versionRange>
                    <goals>
                      <goal>generate-depends-file</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>transform</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>shell-maven-plugin
                    </artifactId>
                    <versionRange>[1.0-beta-1,)
                    </versionRange>
                    <goals>
                      <goal>shell</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.daisy.pipeline.build</groupId>
                    <artifactId>modules-build-helper</artifactId>
                    <versionRange>[2.0.0,)</versionRange>
                    <goals>
                      <goal>process-catalog</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>



  <profiles>
    <profile>
      <id>pipeline-xml-module</id>
      <activation>
        <file>
          <exists>src/main/resources/META-INF/catalog.xml</exists>
        </file>
      </activation>
      <build>
        <resources>
          <resource>
            <directory>src/main/resources</directory>
            <excludes>
              <exclude>META-INF/catalog.xml</exclude>
            </excludes>
          </resource>
        </resources>
        <plugins>
          <plugin>
            <groupId>org.daisy.pipeline.build</groupId>
            <artifactId>modules-build-helper</artifactId>
            <executions>
              <execution>
                <id>process-catalog</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-catalog</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
              <instructions>
                <!-- always add Maven resources - add OSGI-INF if it exists -->
                <!--
                     TODO replace the hackish syntax when this is released:
                     https://github.com/bndtools/bnd/issues/168
                 -->
                <Include-Resource>
     {maven-resources}$(if;$(replace;$(isdir;${project.build.directory}/generated-resources/process-catalog/OSGI-INF);false(.*);$1);,OSGI-INF=${project.build.directory}/generated-resources/process-catalog/OSGI-INF)
                </Include-Resource>
                <_include>${project.build.directory}/generated-resources/process-catalog/bnd.bnd</_include>
              </instructions>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.daisy.maven</groupId>
            <artifactId>xspec-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
              <execution>
                <id>xspecTest</id>
                <phase>test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>documentation-module</id>
      <activation>
        <file>
          <exists>src/main</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-markdown-and-html</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}</directory>
                      <includes>
                        <include>index.md</include>
                        <include>src/main/README.md</include>
                        <include>doc/**/*.md</include>
                        <include>doc/**/*.html</include>
                      </includes>
                      <excludes>
                        <exclude>src/main/resources/**/*</exclude>
                      </excludes>
                    </resource>
                  </resources>
                  <outputDirectory>${project.build.directory}/doc/</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-jxr-plugin</artifactId>
            <executions>
              <execution>
                <id>htmlize-java</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>jxr</goal>
                </goals>
                <configuration>
                  <destDir>${project.build.directory}/doc/src/main/java/</destDir>
                  <linkJavadoc>false</linkJavadoc>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.daisy.pipeline.build</groupId>
            <artifactId>modules-build-helper</artifactId>
            <executions>
              <execution>
                <id>xprocdoc</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>xprocdoc</goal>
                </goals>
                <configuration>
                  <sourceDirectory>src/main/resources</sourceDirectory>
                  <outputDirectory>${project.build.directory}/xprocdoc</outputDirectory>
                  <catalogXmlFile>src/main/resources/META-INF/catalog.xml</catalogXmlFile>
                  <includes>xml/**/*.xpl</includes>
                </configuration>
              </execution>
              <execution>
                <id>htmlize-sources</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>htmlize-sources</goal>
                </goals>
                <configuration>
                  <sourceDirectory>${project.basedir}</sourceDirectory>
                  <outputDirectory>${project.build.directory}/doc</outputDirectory>
                  <catalogXmlFile>${project.basedir}/src/main/resources/META-INF/catalog.xml</catalogXmlFile>
                  <includes>
                    src/main/resources/META-INF/catalog.xml,
                    src/main/resources/**/*.xpl,
                    src/main/resources/**/*.xsl,
                    src/main/resources/**/*.xml,
                    src/main/resources/**/*.rng,
                    src/main/resources/**/*.sch,
                    src/main/resources/**/*.css
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <id>package-doc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <classifier>doc</classifier>
                  <classesDirectory>${project.build.directory}/doc</classesDirectory>
                  <includes>
                    <include>**/*.md</include>
                    <include>**/*.html</include>
                    <include>src/main/java/stylesheet.css</include>
                  </includes>
                  <archive>
                    <addMavenDescriptor>false</addMavenDescriptor>
                  </archive>
                </configuration>
              </execution>
              <execution>
                <id>package-xprocdoc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <classifier>xprocdoc</classifier>
                  <classesDirectory>${project.build.directory}/xprocdoc</classesDirectory>
                  <skipIfEmpty>true</skipIfEmpty>
                  <archive>
                    <addMavenDescriptor>false</addMavenDescriptor>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <scm>
    <tag>modules-parent-1.6</tag>
  </scm>
</project>
