<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ PowerAuth Enrollment Server
  ~ Copyright (C) 2021 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>enrollment-server-parent</name>
    <description>Enrollment Server Parent</description>

    <groupId>com.wultra.security</groupId>
    <artifactId>enrollment-server-parent</artifactId>
    <version>1.4.2</version>
    <packaging>pom</packaging>

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

    <inceptionYear>2021</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/enrollment-server.git</connection>
        <developerConnection>scm:git:https://github.com/wultra/enrollment-server.git</developerConnection>
        <url>https://github.com/wultra/enrollment-server</url>
    </scm>

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

    <modules>
        <module>mtoken-model</module>
        <module>enrollment-server-api-model</module>
        <module>enrollment-server</module>
        <module>enrollment-server-onboarding</module>
        <module>enrollment-server-onboarding-adapter-mock</module>
        <module>enrollment-server-onboarding-domain-model</module>
        <module>enrollment-server-onboarding-api-model</module>
        <module>enrollment-server-onboarding-common</module>
    </modules>

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

        <java.version>11</java.version>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <maven-deploy-plugin.version>3.0.0</maven-deploy-plugin.version>
        <maven-enforcer-plugin.version>3.1.0</maven-enforcer-plugin.version>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <maven-swagger-codegen-plugin.version>3.0.34</maven-swagger-codegen-plugin.version>
        <maven-swagger-codegen-handlebars.version>4.3.0</maven-swagger-codegen-handlebars.version>

        <h2.version>2.1.214</h2.version>
        <shedlock-spring.version>4.43.0</shedlock-spring.version>
        <spring-statemachine.version>3.2.0</spring-statemachine.version>
        <swagger-annotations.version>2.2.8</swagger-annotations.version>
        <springdoc-openapi.version>1.6.14</springdoc-openapi.version>
        <wultra-rest-client.version>1.6.0</wultra-rest-client.version>
        <wultra-audit.version>1.6.0</wultra-audit.version>
        <powerauth-crypto.version>1.4.0</powerauth-crypto.version>
        <powerauth-restful-integration.version>1.4.0</powerauth-restful-integration.version>
        <powerauth-push.version>1.4.1</powerauth-push.version>

        <bcprov-jdk18on.version>1.72</bcprov-jdk18on.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.wultra.security</groupId>
                <artifactId>enrollment-server-api-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.wultra.security</groupId>
                <artifactId>enrollment-server-common</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.wultra.security</groupId>
                <artifactId>mtoken-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.core</groupId>
                <artifactId>rest-client-base</artifactId>
                <version>${wultra-rest-client.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.core</groupId>
                <artifactId>rest-model-base</artifactId>
                <version>${wultra-rest-client.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.core</groupId>
                <artifactId>audit-base</artifactId>
                <version>${wultra-audit.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-java-crypto</artifactId>
                <version>${powerauth-crypto.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-restful-security-spring-annotation</artifactId>
                <version>${powerauth-restful-integration.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-restful-security-spring</artifactId>
                <version>${powerauth-restful-integration.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-push-client</artifactId>
                <version>${powerauth-push.version}</version>
            </dependency>

            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger-annotations.version}</version>
            </dependency>

            <!-- Bouncy Castle -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>

            <!-- Documentation -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-ui</artifactId>
                <version>${springdoc-openapi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-security</artifactId>
                <version>${springdoc-openapi.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <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-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-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.apache.tomcat.embed:*:*:*:compile</exclude>
                                        <exclude>org.bouncycastle:bcpkix-jdk15on:*:*:compile</exclude>
                                        <exclude>org.bouncycastle:bcprov-jdk15on:*:*:compile</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </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>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://s01.oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh-staging-distribution</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </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>
        <repository>
            <id>ossrh-snapshots-s01</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
