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

    <name>powerauth-webflow-parent</name>
    <description>Federated Authentication and Authorization Server for Web</description>

    <groupId>io.getlime.security</groupId>
    <artifactId>powerauth-webflow-parent</artifactId>
    <version>1.10.1</version>
    <packaging>pom</packaging>

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

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

    <organization>
        <name>Wultra s.r.o.</name>
        <url>http://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>
        <developer>
            <name>Roman Strobl</name>
            <email>roman.strobl@wultra.com</email>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

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

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

    <modules>
        <module>powerauth-data-adapter-client</module>
        <module>powerauth-data-adapter-model</module>
        <module>powerauth-nextstep</module>
        <module>powerauth-nextstep-client</module>
        <module>powerauth-nextstep-model</module>
        <module>powerauth-webflow</module>
        <module>powerauth-webflow-authentication</module>
        <module>powerauth-webflow-authentication-init</module>
        <module>powerauth-webflow-authentication-form</module>
        <module>powerauth-webflow-authentication-login-sca</module>
        <module>powerauth-webflow-authentication-operation-review</module>
        <module>powerauth-webflow-authentication-mtoken</module>
        <module>powerauth-webflow-authentication-sms</module>
        <module>powerauth-webflow-authentication-approval-sca</module>
        <module>powerauth-webflow-authentication-consent</module>
        <module>powerauth-webflow-i18n</module>
        <module>powerauth-webflow-resources</module>
        <module>powerauth-webflow-client</module>
        <module>powerauth-mtoken-model</module>
        <module>powerauth-tpp-engine</module>
        <module>powerauth-tpp-engine-model</module>
        <module>powerauth-tpp-engine-client</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
        <zxing.version>3.5.3</zxing.version>
        <passay.version>1.6.6</passay.version>
        <shedlock.version>6.9.0</shedlock.version>

        <!-- Documentation Dependencies -->
        <springdoc-openapi-starter-webmvc-ui.version>2.8.9</springdoc-openapi-starter-webmvc-ui.version>
        <swagger-annotations-jakarta.version>2.2.34</swagger-annotations-jakarta.version>

        <moneta.version>1.4.5</moneta.version>
        <owasp-java-html-sanitizer.version>20240325.1</owasp-java-html-sanitizer.version>
        <logstash.version>8.1</logstash.version>

        <!--  Wultra dependencies  -->
        <wultra-core.version>1.12.0</wultra-core.version>
        <powerauth.version>1.10.0</powerauth.version>
        <powerauth-crypto.version>1.10.0</powerauth-crypto.version>
        <powerauth-push.version>1.10.0</powerauth-push.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- PowerAuth Web Flow Dependencies -->
            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-data-adapter-client</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-data-adapter-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-mtoken-model</artifactId>
                <version>${project.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-nextstep-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-tpp-engine-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-approval-sca</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-consent</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-form</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-init</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-login-sca</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-mtoken</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-operation-review</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-authentication-sms</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-i18n</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.getlime.security</groupId>
                <artifactId>powerauth-webflow-resources</artifactId>
                <version>${project.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.getlime.core</groupId>
                <artifactId>rest-model-base</artifactId>
                <version>${wultra-core.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-rest-client-spring</artifactId>
                <version>${powerauth.version}</version>
            </dependency>

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

            <!-- 3rd party libs -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>

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

            <dependency>
                <groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
                <artifactId>owasp-java-html-sanitizer</artifactId>
                <version>${owasp-java-html-sanitizer.version}</version>
            </dependency>

            <!-- Library for formatting monetary amounts -->
            <dependency>
                <groupId>org.javamoney.moneta</groupId>
                <artifactId>moneta-core</artifactId>
                <version>${moneta.version}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>net.logstash.logback</groupId>
                <artifactId>logstash-logback-encoder</artifactId>
                <version>${logstash.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-el</artifactId>
                <version>${tomcat.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Job Scheduling -->
            <dependency>
                <groupId>net.javacrumbs.shedlock</groupId>
                <artifactId>shedlock-bom</artifactId>
                <version>${shedlock.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Documentation -->
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations-jakarta</artifactId>
                <version>${swagger-annotations-jakarta.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>
                <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>
                <configuration>
                    <failOnError>false</failOnError>
                    <detectOfflineLinks>false</detectOfflineLinks>
                </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>
                <dependencies>
                    <dependency>
                        <groupId>de.skuzzle.enforcer</groupId>
                        <artifactId>restrict-imports-enforcer-rule</artifactId>
                        <version>2.6.1</version>
                    </dependency>
                </dependencies>
                <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>
                                        <exclude>com.google.guava:guava*:*:*:compile</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-banned-java-imports</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <RestrictImports>
                                    <reason>com.google.code.findbugs:annotations depends on jsr305 but we prefer jakarta in our code</reason>
                                    <bannedImport>javax.annotation.**</bannedImport>
                                </RestrictImports>
                            </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>central-portal-snapshots</id>
                    <url>https://central.sonatype.com/repository/maven-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>central-portal-snapshots-distribution</id>
                    <url>https://central.sonatype.com/repository/maven-snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>central-portal-staging-distribution</id>
                    <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
