<?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>4.0.2</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>21</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Common lib versions -->
        <activation2.version>2.1.3</activation2.version>
        <jaxb3.version>4.0.2</jaxb3.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>

        <junit5.version>5.13.4</junit5.version>

        <mockito.version>5.16.0</mockito.version>
        <slf4j.version>2.0.17</slf4j.version>

        <jetty.version>12.1.0</jetty.version>

        <jaxrs.version>3.1.0</jaxrs.version>
        <jersey.version>3.1.11</jersey.version>

        <testcontainers.version>1.21.3</testcontainers.version>

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

        <central.publishing.maven.plugin.version>0.7.0</central.publishing.maven.plugin.version>
    </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-4.0.2</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>sonatype-central</id>
            <name>Sonatype Central Portal Repository</name>
        </repository>
    </distributionManagement>

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

        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</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.3</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.2</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.14.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.5.3</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.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central.publishing.maven.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>sonatype-central</publishingServerId>
                </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>
