<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>
    <packaging>jar</packaging>
    <version>1.2.1</version>
    <artifactId>openrtf</artifactId>

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

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

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.plugin.repository.version>2.3.1</maven.plugin.repository.version>
        <maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
        <maven.javadoc.plugin.version>3.0.1</maven.javadoc.plugin.version>
        <maven.source.version>3.0.1</maven.source.version>
    </properties>

    <dependencies>
        <dependency>
            <!-- OpenRTF depends on RtfElementInterface from OpenPDF. -->
            <groupId>${project.groupId}</groupId>
            <artifactId>openpdf</artifactId>
            <version>1.3.26</version>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <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>
            <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.6</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.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <!-- Disable doclint checks to build it under java 8 javadoc -->
                        <configuration>
                            <additionalJOptions>-Xdoclint:none</additionalJOptions>
                        </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>

        </plugins>
    </build>

    <developers>
        <developer>
            <name>The OpenPDF Project</name>
            <organizationUrl>https://github.com/librepdf</organizationUrl>
        </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>
