<?xml version="1.0" encoding="UTF-8"?>
<!--
~ PowerAuth Crypto library
~ Copyright 2018 Wultra s.r.o.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

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

    <name>powerauth-crypto-parent</name>
    <description>PowerAuth Cryptography</description>

    <groupId>io.getlime.security</groupId>
    <artifactId>powerauth-crypto-parent</artifactId>
    <version>1.4.0</version>
    <packaging>pom</packaging>

    <inceptionYear>2016</inceptionYear>
    <url>http://powerauth.com/</url>

    <organization>
        <name>Wultra s.r.o.</name>
        <url>https://wultra.com/</url>
    </organization>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Petr Dvorak</name>
            <email>petr@wultra.com</email>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/wultra/powerauth-crypto.git</connection>
        <developerConnection>scm:git:https://github.com/wultra/powerauth-crypto.git</developerConnection>
        <url>https://github.com/wultra/powerauth-crypto</url>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/wultra/powerauth-crypto/issues</url>
    </issueManagement>

    <modules>
        <module>powerauth-java-crypto</module>
        <module>powerauth-java-http</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-deploy-plugin.version>3.0.0</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <guava.version>31.1-jre</guava.version>
        <slf4j.version>2.0.5</slf4j.version>
        <junit.version>5.9.1</junit.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.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-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven-deploy-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.kohsuke</groupId>
                        <artifactId>pgp-maven-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>disable-java8-doclint</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>
        <profile>
            <id>internal-repository</id>
            <activation>
                <property>
                    <name>useInternalRepo</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
            </properties>
            <distributionManagement>
                <repository>
                    <id>jfrog-central</id>
                    <name>Wultra Artifactory-releases</name>
                    <url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
                </repository>
                <snapshotRepository>
                    <id>jfrog-central</id>
                    <name>Wultra Artifactory-snapshots</name>
                    <url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
                </snapshotRepository>
            </distributionManagement>
            <repositories>
                <repository>
                    <id>jfrog-central</id>
                    <name>Wultra Artifactory-releases</name>
                    <url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
                </repository>
                <repository>
                    <id>ossrh-snapshots</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>public-repository</id>
            <activation>
                <property>
                    <name>!useInternalRepo</name>
                </property>
            </activation>
            <properties>
            </properties>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh-snapshots-distribution</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh-staging-distribution</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>


</project>
