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

    <groupId>ru.argento</groupId>
    <artifactId>jfunction</artifactId>
    <version>0.1</version>
    <packaging>jar</packaging>

    <name>Functional utilities</name>
    <description>Library for various functional interface manipulations</description>
    <url>https://www.argento.ru/projects/jfunction/</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://spdx.org/licenses/MIT.html</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/argento-dev/jfunction</connection>
        <developerConnection>scm:git:ssh://git@github.com/argento-dev/jfunction-dev</developerConnection>
        <url>https://github.com/argento-dev/jfunction</url>
    </scm>

    <developers>
        <developer>
            <id>alexander</id>
            <name>Alexander Potehin</name>
            <email>alexander@argento.ru</email>
            <timezone>3</timezone>
        </developer>
    </developers>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <pmd.version>6.22.0</pmd.version>
        <pmd.ruleset>${project.basedir}/pmd.xml</pmd.ruleset>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>

                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>

                    <fork>true</fork>

                    <compilerArgs>
                        <arg>-Xlint:all</arg>
                        <arg>-Xdoclint:all</arg>
                        <arg>-Xpkginfo:always</arg>
                        <arg>-Werror</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>

                <executions>
                    <execution>
                        <id>javadoc-jar</id>

                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>

                <executions>
                    <execution>
                        <id>source-jar</id>

                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>

                <executions>
                    <execution>
                        <id>sign-artifacts</id>

                        <phase>package</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.13.0</version>

                <configuration>
                    <rulesets>
                        <ruleset>${pmd.ruleset}</ruleset>
                    </rulesets>
                    <failOnViolation>true</failOnViolation>
                    <printFailingErrors>true</printFailingErrors>
                    <analysisCache>true</analysisCache>
                    <linkXRef>false</linkXRef>
                </configuration>

                <executions>
                    <execution>
                        <id>pmd-check</id>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-core</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-java</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
