<?xml version="1.0"?>
<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>tv.hd3g.commons</groupId>
    <artifactId>starter</artifactId>
    <packaging>pom</packaging>
    <version>9.0.2</version>

    <name>Commons Maven starter project</name>
    <url>https://github.com/hdsdi3g/prodlib</url>
    <description>Maven starter project for all hdsdi3g' java projects</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.7</version>
        <relativePath />
    </parent>

    <modules>
        <module>parent</module>
        <module>parent-web</module>
        <module>interfaces</module>
        <module>app</module>
        <module>app-web</module>
        <module>selfautorestdoc</module>
        <module>authkit</module>
        <module>mailkit</module>
        <module>jobkit</module>
        <module>transfertfiles</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <java.version>11</java.version>

        <mockito.version>4.4.0</mockito.version>
        <datafaker.version>1.3.0</datafaker.version>
        <owasp.encoder.version>1.2.3</owasp.encoder.version>
        <ognl.version>3.2.1</ognl.version>
        <commons.text.version>1.9</commons.text.version>
        <commons.net.version>3.8.0</commons.net.version>
        <commons.io.version>2.11.0</commons.io.version>
        <commons.compress.version>1.21</commons.compress.version>
        <sshj.version>0.33.0</sshj.version>
        <bouncycastle.version>1.70</bouncycastle.version>
        <xz.version>1.8</xz.version>
        <ftpserver.version>1.1.2</ftpserver.version>
        <sshd.version>2.8.0</sshd.version>
        <jsch.version>0.1.55</jsch.version>
        <jsonwebtoken.version>0.11.2</jsonwebtoken.version>
        <argon2.version>2.7</argon2.version>
        <zxing.version>3.5.0</zxing.version>
        <log4j2.version>2.17.2</log4j2.version>
        <maven.gpg.version>3.0.1</maven.gpg.version>
        <gpg.skip>true</gpg.skip>
        <license-maven-plugin.version>2.0.0</license-maven-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.12</nexus-staging-maven-plugin.version>
        <maven.jacoco.version>0.8.8</maven.jacoco.version>
        <sonar.version>3.9.1.2184</sonar.version>

        <codepolicyvalidation.version>1.0.4</codepolicyvalidation.version>
        <setupdb.version>2.0.2</setupdb.version>
        <processlauncher.version>6.0.5</processlauncher.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>tv.hd3g.commons</groupId>
            <artifactId>codepolicyvalidation</artifactId>
            <version>${codepolicyvalidation.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.datafaker</groupId>
            <artifactId>datafaker</artifactId>
            <version>${datafaker.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ognl</groupId>
                <artifactId>ognl</artifactId>
                <version>${ognl.version}</version>
            </dependency>
            <dependency>
                <groupId>org.owasp.encoder</groupId>
                <artifactId>encoder</artifactId>
                <version>${owasp.encoder.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${commons.text.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <organization>
        <name>hd3g.tv</name>
        <url>https://hd3g.tv</url>
    </organization>
    <developers>
        <developer>
            <name>hdsdi3g</name>
            <email>admin@hd3g.tv</email>
            <organization>hd3g.tv</organization>
            <organizationUrl>https://hd3g.tv</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/hdsdi3g/prodlib.git</connection>
        <developerConnection>scm:git:ssh://github.com/hdsdi3g/prodlib.git</developerConnection>
        <url>https://github.com/hdsdi3g/prodlib</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <url>https://github.com/hdsdi3g/prodlib/issues</url>
        <system>GitHub</system>
    </issueManagement>
    <licenses>
        <license>
            <name>GNU Lesser General Public License, Version 3</name>
            <url>https://www.gnu.org/licenses/lgpl.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>coverage</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${maven.jacoco.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report-aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sonar</id>
            <properties>
                <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
            </properties>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${sonar.version}</version>
                        <executions>
                            <execution>
                                <id>sonar</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sonar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>${maven.compiler.release}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                            <passphraseServerId>${gpg.keyname}</passphraseServerId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>add-third-party</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}</outputDirectory>
                            <useMissingFile>true</useMissingFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>