<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to ObjectStyle LLC under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ObjectStyle LLC licenses
  this file to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
  -->

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.bootique.modules.parent</groupId>
    <artifactId>bootique-modules-parent</artifactId>
    <version>3.0.25</version>
    <packaging>pom</packaging>

    <name>bootique-modules-parent: A parent POM of Bootique standard modules.</name>
    <description>
        Stores common developments and deployment settings for Bootique standard modules.
    </description>

    <url>https://bootique.io</url>
    <organization>
        <name>ObjectStyle LLC</name>
    </organization>

    <properties>
        <maven.compiler.release>11</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Common lib versions -->
        <activation.version>1.2.2</activation.version>

        <!-- Keeping separate vars for Jackson and Jackson databind modules, at they occasionally diverge -->
        <jackson.version>2.15.4</jackson.version>
        <jackson.databind.version>2.15.4</jackson.databind.version>

        <jaxb.version>2.3.1</jaxb.version>

        <junit4.version>4.13.2</junit4.version>
        <junit5.version>5.11.3</junit5.version>

        <mockito.version>3.9.0</mockito.version>
        <slf4j.version>2.0.16</slf4j.version>

        <jetty10.version>10.0.24</jetty10.version>
        <jetty11.version>11.0.24</jetty11.version>

        <jaxrs2.version>2.1.6</jaxrs2.version>
        <jersey2.version>2.45</jersey2.version>

        <jaxrs3.version>3.0.0</jaxrs3.version>
        <jersey3.version>3.0.16</jersey3.version>

        <testcontainers.version>1.20.3</testcontainers.version>

        <!-- Other properties -->
        <gpg.pinentry-mode>loopback</gpg.pinentry-mode>
    </properties>

    <developers>
        <developer>
            <id>andrus</id>
            <name>Andrus Adamchik</name>
            <email>andrus@objectstyle.com</email>
            <organization>ObjectStyle</organization>
            <timezone>America/New_York</timezone>
        </developer>
    </developers>

    <scm child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false" child.scm.connection.inherit.append.path="false">

        <developerConnection>scm:git:ssh://git@github.com/bootique/${project.artifactId}</developerConnection>
        <url>https://github.com/bootique/${project.artifactId}</url>
        <tag>bootique-modules-parent-3.0.25</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0 License</name>
            <url>https://github.com/bootique/bootique/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <distributionManagement>
        <repository>
            <id>oss-sonatype-releases</id>
            <name>Deployment Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>oss-sonatype-snapshots</id>
            <name>Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>bootique-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <!-- Main artifact repo -->
        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- Contains staging artifacts that may not yet be available in Central-->
        <repository>
            <id>oss-sonatype-staging</id>
            <url>https://oss.sonatype.org/content/groups/staging/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.13</version>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.5.2</version>
                    <configuration>
                        <useModulePath>false</useModulePath>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.13</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <!-- This plugin replaces maven-deploy-plugin and "deploy" goal -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <serverId>oss-sonatype-releases</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- Optional profile used to sign artifacts -->
    <profiles>
        <profile>
            <id>gpg</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>${gpg.pinentry-mode}</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>rat</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludes combine.children="append">
                                <exclude>**/RELEASE-NOTES.md</exclude>
                                <exclude>**/LICENSE</exclude>
                                <exclude>**/META-INF/services/</exclude>
                                <exclude>**/NOTICES</exclude>
                                <exclude>**/.gitignore</exclude>
                                <exclude>**/target/**</exclude>
                                <exclude>.vscode/**</exclude>
                                <exclude>.github/**/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
