<?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>cz.d1x</groupId>
    <artifactId>dxcrypto</artifactId>
    <version>2.4.0</version>

    <packaging>pom</packaging>
    <modules>
        <module>dxcrypto-core</module>
        <module>dxcrypto-bc</module>
    </modules>

    <name>DXCrypto</name>
    <description>Set of simple tools for cryptography</description>
    <url>https://github.com/d1x/dxcrypto</url>

    <developers>
        <developer>
            <name>Zdenek Obst</name>
            <email>zdenek.obst@gmail.com</email>
            <organizationUrl>https://github.com/d1x</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.encoding>UTF-8</project.build.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <java.version>1.8</java.version>

        <bouncycastle.version>1.65</bouncycastle.version>
        <junit.version>4.11</junit.version>
        <mockito.version>2.18.3</mockito.version>
        <mvn.compiler.version>3.1</mvn.compiler.version>
        <mvn.source.version>2.2.1</mvn.source.version>
        <mvn.jar.version>2.4</mvn.jar.version>
        <mvn.javadoc.version>2.9.1</mvn.javadoc.version>
        <mvn.gpg.version>1.6</mvn.gpg.version>
        <mvn.nexus.version>1.6.7</mvn.nexus.version>
    </properties>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:d1x/dxcrypto.git</connection>
        <developerConnection>scm:git:git@github.com:d1x/dxcrypto.git</developerConnection>
        <url>git@github.com:d1x/dxcrypto.git</url>
    </scm>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mvn.compiler.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${mvn.nexus.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${mvn.source.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${mvn.javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${mvn.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
