<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>

    <groupId>com.github.librepdf</groupId>
    <artifactId>openpdf-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0.1</version>

    <licenses>
        <license>
            <name>GNU General Lesser Public License (LGPL) version 3.0</name>
            <url>http://www.gnu.org/licenses/lgpl.html</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Mozilla Public License Version 2.0</name>
            <url>http://www.mozilla.org/MPL/2.0/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>openpdf</module>
        <module>pdf-xml</module>
        <module>pdf-rtf</module>
        <module>pdf-html</module>
        <module>pdf-swing</module>
        <module>pdf-toolbox</module>
    </modules>

    <name>OpenPDF - Free and Open PDF</name>
    <url>https://github.com/LibrePDF/OpenPDF</url>
    <description>Open and Free PDF library.</description>
    <scm>
        <url>scm:git:https://github.com/LibrePDF/OpenPDF</url>
        <connection>scm:git:https://github.com/LibrePDF/OpenPDF</connection>
        <developerConnection>scm:git:https://github.com/LibrePDF/OpenPDF</developerConnection>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.test.failure.ignore>false</maven.test.failure.ignore>
        <java.version>1.7</java.version>
        <maven.source.version>2.4</maven.source.version>
        <maven.javadoc.plugin.version>2.10.1</maven.javadoc.plugin.version>
        <maven.clean.plugin.version>2.6.1</maven.clean.plugin.version>
        <maven.dependency.plugin.version>2.9</maven.dependency.plugin.version>
        <maven.compiler.plugin.version>3.2</maven.compiler.plugin.version>
        <maven.release.plugin.version>2.5.1</maven.release.plugin.version>
        <maven.jar.plugin.version>2.5</maven.jar.plugin.version>
        <maven.plugin.repository.version>2.3.1</maven.plugin.repository.version>
        <maven.plugin.bundle.version>3.2.0</maven.plugin.bundle.version>
    </properties>
    <!-- Support for compilation under java 8 -->
    <profiles>
        <profile>
            <id>java8-javadoc</id>
            <activation>
                <jdk>[1.8,</jdk>
            </activation>
            <properties>
                <javadoc.param>-Xdoclint:none</javadoc.param>
            </properties>
        </profile>
    </profiles>
    <build>
        <plugins>
            <!-- Create sources for better debugging and context assist -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Create javadoc for help -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <!-- Disable doclint checks to build it under java 8 javadoc -->
                        <configuration>
                            <additionalparam>${javadoc.param}</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Clean also test results -->
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.clean.plugin.version}</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>./out</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                        <fileset>
                            <directory>./test</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                        <fileset>
                            <directory>./target</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                        <fileset>
                            <directory>.</directory>
                            <includes>
                                <include>*.rtf</include>
                                <include>*.pdf</include>
                                <include>*.html</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <!-- Set java to 8 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <!-- Use the Bnd generated MANIFEST.MF in the jar -->
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-repository-plugin</artifactId>
                <version>${maven.plugin.repository.version}</version>
            </plugin>
            <!-- GPG signing config -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>1.5</version>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>1.6.7</version>
              <extensions>true</extensions>
              <configuration>
                 <serverId>ossrh</serverId>
                 <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                 <autoReleaseAfterClose>false</autoReleaseAfterClose>
              </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${maven.plugin.bundle.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <!-- bind the manifest.mf generation after the 'compile' phase -->
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- unpack bundle, so humans can see the manifest without unpacking the jar -->
                    <unpackBundle>true</unpackBundle>
                    <!-- All com.lowagie.* packages are 'public' -->
                    <instructions>
                        <Export-Package>com.lowagie.*;version="${project.version}"</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>

        <!-- Test Dependencies -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.6.1</version>
        </dependency>
    </dependencies>

    <developers>
        <developer>
            <name>Art Krahenbuhl</name>
            <email>rtfarte@gmail.com</email>
            <organizationUrl>https://github.com/rtfarte</organizationUrl>
        </developer>
        <developer>
            <name>Andreas Røsdal</name>
            <email>andreas.rosdal@nospam-gmail.com</email>
            <organizationUrl>https://github.com/andreasrosdal</organizationUrl>
            <url>https://www.twitter.com/andreasrosdal</url>
        </developer>
    </developers>
    <!-- Distribution config from http://central.sonatype.org/pages/apache-maven.html#distribution-management-and-authentication -->
    <distributionManagement>
      <snapshotRepository>
       <id>ossrh</id>
       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
     </distributionManagement>
</project>
