<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2012-2017, Joyent, Inc. All rights reserved.

 This Source Code Form is subject to the terms of the GNU Lesser
 General Public License, v. 2.0. If a copy of the LGPL was not distributed with this
 file, You can obtain one at https://www.gnu.org/copyleft/lesser.html
-->
<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.joyent.util</groupId>
    <artifactId>fast-md5</artifactId>
    <version>2.7.1</version>
    <packaging>jar</packaging>

    <name>java-fast-md5</name>
    <description>Fork of TWMacinta's FastMD5 project for consumption through Maven Central</description>
    <url>https://github.com/joyent/java-fast-md5</url>
    <organization>
        <name>Joyent</name>
        <url>joyent.com</url>
    </organization>

    <licenses>
        <license>
            <name>LGPL v2.1</name>
            <url>https://www.gnu.org/copyleft/lesser.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Timothy W. Macinta</name>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Tomas Celaya</name>
            <organization>Joyent</organization>
            <organizationUrl>joyent.com</organizationUrl>
        </contributor>
    </contributors>

    <scm>
        <connection>scm:git:git://github.com/joyent/java-fast-md5.git</connection>
        <developerConnection>scm:git:git://github.com/joyent/java-fast-md5.git</developerConnection>
        <url>git@github.com:joyent/java-fast-md5.git</url>
        <tag>fast-md5-2.7.1</tag>
    </scm>

    <issueManagement>
        <system>github.com</system>
        <url>https://github.com/joyent/java-fast-md5/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
        <checkstyle.skip>false</checkstyle.skip>
        <maven.min.version>3.1</maven.min.version>
        <maven.test.skip>false</maven.test.skip>
        <maven.integration.test.skip>false</maven.integration.test.skip>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>

    </properties>

    <repositories>
        <repository>
            <id>sonatype</id>
            <name>oss-sonatype</name>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>${maven-antrun-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.5.0</version>
                        <scope>system</scope>
                        <systemPath>${java.home}/../lib/tools.jar</systemPath>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-apache-regexp</artifactId>
                        <version>1.10.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                </configuration>
                <executions>
                    <execution>
                        <id>antrun-clean</id>
                        <phase>clean</phase>
                        <configuration>
                            <tasks>
                                <echo message="executing clean task" />
                                <ant antfile="build.xml" target="clean" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <!--
                    Disable native library packaging temporarily

                    <execution>
                        <id>antrun-package</id>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <echo message="executing dist task" />
                                <ant antfile="build.xml" target="dist" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    -->
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--
        The release profile only needs activated when cutting a release for maven central.
        It will generate additional artifacts for javadoc and source as well as GPG signatures for each artifact.
        This profile also assumes that the properties for the gpg plugin (such as gpg.keyname and gpg.passphrase
        are either defined in a settings.xml file or similar facility.
        -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
