<?xml version="1.0" encoding="UTF-8"?>
<!--
~ PowerAuth Server and related software components
~ Copyright (C) 2018 Wultra s.r.o.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published
~ by the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<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-server-parent</name>
    <description>PowerAuth Server</description>

    <groupId>io.getlime.security</groupId>
    <artifactId>powerauth-server-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <inceptionYear>2017</inceptionYear>
    <url>https://powerauth.com/</url>

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

    <licenses>
        <license>
            <name>GNU Affero General Public License v3.0</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.en.html</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-server.git</connection>
        <developerConnection>scm:git:https://github.com/wultra/powerauth-server.git</developerConnection>
        <url>https://github.com/wultra/powerauth-server</url>
    </scm>

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

    <modules>
        <module>powerauth-client-model</module>
        <module>powerauth-rest-client-spring</module>
        <module>powerauth-java-server</module>
    </modules>

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

        <!-- Maven Properties and Dependencies -->
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
        <maven-war-plugin.version>3.3.2</maven-war-plugin.version>

        <!-- Spring Dependencies -->
        <spring-cloud-vault.version>3.1.0</spring-cloud-vault.version>

        <!-- PowerAuth Dependencies -->
        <powerauth-java-crypto.version>1.2.0</powerauth-java-crypto.version>
        <powerauth-rest-base.version>1.4.0</powerauth-rest-base.version>
        <bcprov-jdk15on.version>1.69</bcprov-jdk15on.version>

        <!-- Java 11 Dependencies -->
        <jaxb-api.version>2.3.1</jaxb-api.version>
        <jaxb-impl.version>2.3.4</jaxb-impl.version>
        <jaxb-runtime.version>2.3.4</jaxb-runtime.version>
        <istack-commons-runtime.version>3.0.12</istack-commons-runtime.version>
        <javax.xml.soap-api.version>1.4.0</javax.xml.soap-api.version>
        <javax.validation.version>2.0.1.Final</javax.validation.version>
        <saaj-impl.version>1.5.3</saaj-impl.version>

        <!-- Documentation Dependencies -->
        <springdoc-openapi.version>1.6.1</springdoc-openapi.version>

        <!-- Scheduled Job Dependencies -->
        <schedlock.version>4.30.0</schedlock.version>

        <!-- Test Dependencies -->
        <junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
        <h2.version>1.4.197</h2.version> <!-- Tests fail in version 1.4.200, upgrade reverted -->

        <!-- Other Dependencies -->
        <jackson.version>2.13.0</jackson.version>
        <commons-text.version>1.9</commons-text.version>

    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <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-war-plugin</artifactId>
                <version>${maven-war-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>
                        <configuration>
                            <additionalOptions>
                                <additionalOption>-Xdoclint:none</additionalOption>
                            </additionalOptions>
                        </configuration>
                    </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>
    </profiles>

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

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

</project>
