<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.florianschoppmann.java</groupId>
    <artifactId>java-futures</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>Java Futures</name>
    <description>
        Bridge gaps and help overcome inconveniences with CompletableFuture.

        This module includes, among other features, methods to collect the results of multiple futures into a list,
        provides equivalent alternatives to CompletableFuture’s monadic methods (thenApply, thenCompose, etc.) that can
        deal with checked exceptions, and methods for asynchronous “try-with-resources” constructs.
    </description>
    <url>https://github.com/fschopp/java-futures</url>

    <licenses>
        <license>
            <name>Revised BSD (3-Clause) License</name>
            <url>https://raw.github.com/fschopp/java-futures/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/fschopp/java-futures</url>
        <connection>scm:git:https://github.com/fschopp/java-futures.git</connection>
        <developerConnection>scm:git:https://github.com/fschopp/java-futures.git</developerConnection>
        <tag>v1.0.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/fschopp/java-futures/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Travis</system>
        <url>https://travis-ci.org/fschopp/java-futures</url>
    </ciManagement>

    <developers>
        <developer>
            <id>fschopp</id>
            <name>Florian Schoppmann</name>
            <email>mail@florian-schoppmann.net</email>
            <url>http://www.florian-schoppmann.net</url>
        </developer>
    </developers>

    <inceptionYear>2016</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <checkstyle.version>6.15</checkstyle.version>
        <findbugs.annotations.version>3.0.1</findbugs.annotations.version>
        <findbugs.plugin.version>3.0.3</findbugs.plugin.version>
        <jacoco.version>0.7.6.201602180812</jacoco.version>
        <java.version>1.8</java.version>
        <jsr305.version>3.0.1</jsr305.version>
        <maven.compiler.version>3.5.1</maven.compiler.version>
        <maven.checkstyle.version>2.17</maven.checkstyle.version>
        <maven.dependency.version>2.10</maven.dependency.version>
        <maven.javadoc.version>2.10.3</maven.javadoc.version>
        <maven.jar.version>2.6</maven.jar.version>
        <maven.jxr.version>2.5</maven.jxr.version>
        <maven.pmd.version>3.6</maven.pmd.version>
        <maven.gpg.version>1.6</maven.gpg.version>
        <maven.project-info-reports.version>2.8.1</maven.project-info-reports.version>
        <maven.release.version>2.5.3</maven.release.version>
        <maven.source.version>3.0.0</maven.source.version>
        <nexus.staging.version>1.6.6</nexus.staging.version>
        <testng.version>6.9.10</testng.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${jsr305.version}</version>
            <!-- Needed only for annotations -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <site>
            <url>scm:git:https://github.com/fschopp/java-futures.git</url>
        </site>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>${maven.jxr.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven.pmd.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven.checkstyle.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <failOnViolation>true</failOnViolation>
                            <consoleOutput>true</consoleOutput>
                            <configLocation>src/main/config/checkstyle.xml</configLocation>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <outputXML>true</outputXML>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <!-- Prepares property "argLine" pointing to the JaCoCo runtime agent that can be
                                 passed as a VM argument to the application under test. This property needs to
                                 be used by the surefire and failsafe plugins. -->
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.version}</version>
                <configuration>
                    <!-- Use a local checkout instead of doing a checkout from the upstream repository -->
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <!-- Disable the release profile that is part of the Maven Super POM -->
                    <useReleaseProfile>false</useReleaseProfile>
                    <!-- During release:perform, enable the "release" profile
                         (form for multiple profiles would be: "a,b") -->
                    <releaseProfiles>release</releaseProfiles>
                    <!-- Form for multiple goals would be: "a b"-->
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <!-- Maven 3.2.1 seems not to honor the configured versions from build -> pluginManagement.  -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven.project-info-reports.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${maven.jxr.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven.pmd.version}</version>
                <configuration>
                    <printFailingErrors>true</printFailingErrors>
                    <targetJdk>${java.version}</targetJdk>
                    <rulesets>
                        <ruleset>${project.basedir}/src/main/config/pmd.xml</ruleset>
                    </rulesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.annotations.version}</version>
                <configuration>
                    <effort>Max</effort>
                    <xmlOutput>true</xmlOutput>
                    <excludeFilterFile>${project.basedir}/src/main/config/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.source.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                    <goal>test-jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus.staging.version}</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-gpg-plugin</artifactId>
                        <version>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
