<?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>org.teamapps</groupId>
    <artifactId>teamapps-application-api</artifactId>
    <version>0.66</version>

    <properties>
        <maven.compiler.source>14</maven.compiler.source>
        <maven.compiler.target>14</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-assembly-plugin-version>3.0.0</maven-assembly-plugin-version>
        <teamapps-version>0.9.148</teamapps-version>
        <universal-db-version>0.5.20</universal-db-version>
    </properties>

    <name>TeamApps Application API</name>
    <description>API for the TeamApps Application Server</description>
    <url>https://github.com/teamapps-org/teamapps-application-api</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Matthias Bernstein</name>
            <email>matthias.bernstein@teamapps.org</email>
            <id>matthias-bernstein</id>
        </developer>
    </developers>


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

    <scm>
        <url>https://github.com/teamapps-org/teamapps-application-api</url>
        <connection>scm:git:git@github.com:teamapps-org/teamapps-application-api.git</connection>
        <developerConnection>scm:git:git@github.com:teamapps-org/teamapps-application-api.git</developerConnection>
        <tag>v0.66</tag>
    </scm>


    <dependencies>
        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-ux</artifactId>
            <version>${teamapps-version}</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-server-undertow-embedded</artifactId>
            <version>${teamapps-version}</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-server-jetty-embedded</artifactId>
            <version>${teamapps-version}</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-media</artifactId>
            <version>1.3</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>universal-db</artifactId>
            <version>${universal-db-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>google-http-client</artifactId>
                    <groupId>com.google.http-client</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>one.util</groupId>
            <artifactId>streamex</artifactId>
            <version>0.8.1</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-reporting</artifactId>
            <version>1.8</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-lang3</artifactId>
                    <groupId>org.apache.commons</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-io</artifactId>
                    <groupId>commons-io</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>httpclient</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>checker-qual</artifactId>
                    <groupId>org.checkerframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-compress</artifactId>
                    <groupId>org.apache.commons</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>error_prone_annotations</artifactId>
                    <groupId>com.google.errorprone</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-core</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-databind</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jakarta.activation-api</artifactId>
                    <groupId>jakarta.activation</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.36</version>
        </dependency>


        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-material-icon-provider</artifactId>
            <version>${teamapps-version}</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-flags-icon-provider</artifactId>
            <version>0.9.12</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-fontawesome-icon-provider</artifactId>
            <version>0.9.9</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-antu-icon-provider</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <version>71.1</version>
        </dependency>

        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-translate</artifactId>
            <version>2.1.13</version>
        </dependency>

        <dependency>
            <groupId>de.mkammerer</groupId>
            <artifactId>argon2-jvm</artifactId>
            <version>2.11</version>
            <exclusions>
                <exclusion>
                    <artifactId>jna</artifactId>
                    <groupId>net.java.dev.jna</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>nl.basjes.parse.useragent</groupId>
            <artifactId>yauaa</artifactId>
            <version>6.12</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-lang3</artifactId>
                    <groupId>org.apache.commons</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-collections4</artifactId>
                    <groupId>org.apache.commons</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.maxmind.db</groupId>
            <artifactId>maxmind-db</artifactId>
            <version>2.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.libphonenumber</groupId>
            <artifactId>libphonenumber</artifactId>
            <version>8.12.47</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.libphonenumber</groupId>
            <artifactId>prefixmapper</artifactId>
            <version>2.182</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.libphonenumber</groupId>
            <artifactId>carrier</artifactId>
            <version>1.173</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.libphonenumber</groupId>
            <artifactId>geocoder</artifactId>
            <version>2.183</version>
        </dependency>


        <dependency>
            <groupId>me.gosimple</groupId>
            <artifactId>nbvcxz</artifactId>
            <version>1.5.0</version>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.teamapps</groupId>
                <artifactId>universal-db-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate-model</goal>
                        </goals>
                        <configuration>
                            <modelSourceDirectory>${project.basedir}/src/main/model</modelSourceDirectory>
                            <modelClasses>
                                <modelClass>Model</modelClass>
                                <modelClass>ApiModel</modelClass>
                                <modelClass>MockModel</modelClass>
                            </modelClasses>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <!-- see https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven -->
                            <mavenExecutorId>forked-path</mavenExecutorId>
                            <useReleaseProfile>false</useReleaseProfile>
                            <!--<arguments>-Psonatype-oss-release -D${gpg.arguments}</arguments>-->
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <tagNameFormat>v@{version}</tagNameFormat>
                            <releaseProfiles>javadoc-jar,sources-jar,license-handling</releaseProfiles>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>javadoc-jar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>generate-javadoc-jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sources-jar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>generate-sources-jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>license-handling</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>1.19</version>
                        <executions>
                            <execution>
                                <id>download-licenses</id>
                                <goals>
                                    <goal>download-licenses</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>update-project-license</id>
                                <goals>
                                    <goal>update-project-license</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>update-file-header</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>update-file-header</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <projectName>TeamApps Application API</projectName>
                            <organizationName>TeamApps.org</organizationName>
                            <inceptionYear>2020</inceptionYear>
                            <licenseName>apache_v2</licenseName>
                            <processStartTag>========================LICENSE_START=================================
                            </processStartTag>
                            <processEndTag>=========================LICENSE_END==================================
                            </processEndTag>
                            <sectionDelimiter>---</sectionDelimiter>
                            <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            <canUpdateCopyright>true</canUpdateCopyright>
                            <canUpdateDescription>true</canUpdateDescription>
                            <canUpdateLicense>true</canUpdateLicense>
                            <roots>
                                <root>src/main</root>
                                <root>src/test</root>
                                <root>target/generated-sources</root>
                                <root>target/generated-resources</root>
                            </roots>
                            <excludes>
                                <exclude>**/*.json</exclude>
                                <exclude>**/*.svg</exclude>
                                <exclude>**/*.txt</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>