<?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" child.project.url.inherit.append.path="false" 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>dev.bannmann</groupId>
    <artifactId>base</artifactId>
    <version>1.14</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Provides common plugins and settings</description>
    <url>https://github.com/bannmann/base</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jens Bannmann</name>
            <email>jens.b@web.de</email>
        </developer>
    </developers>

    <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
        <connection>scm:git:https://github.com/bannmann/base.git</connection>
        <tag>HEAD</tag>
        <url>https://github.com/bannmann/base</url>
    </scm>

    <properties>
        <base.central.deploymentName>${project.url} - ${project.version}</base.central.deploymentName>
        <!-- configures Toolchains and Compiler plugins -->
        <base.java>11</base.java>
        <base.toolchains.jdk>${base.java}</base.toolchains.jdk>
        <!-- use this to skip the versions plugin in BOM projects as it would report nonsense -->
        <base.versionsPlugin.enabled>true</base.versionsPlugin.enabled>
        <lombok.core.version>1.18.36</lombok.core.version>
        <lombok.plugin.version>1.18.20.0</lombok.plugin.version>
        <maven.compiler.source>${base.java}</maven.compiler.source>
        <maven.compiler.target>${base.java}</maven.compiler.target>
        <mizool.version>0.52</mizool.version>
        <mockito-core.version>3.3.3</mockito-core.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>2.0.9</slf4j.version>
        <testng.version>6.8.17</testng.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.mizool</groupId>
                <artifactId>mizool-core</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool</groupId>
                <artifactId>mizool-core</artifactId>
                <version>${mizool.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-aws</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-cache</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-cassandra</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-gson</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-jackson</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-sql</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-web</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology</groupId>
                <artifactId>technology-web</artifactId>
                <version>${mizool.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.table-access</groupId>
                <artifactId>table-access-business</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.table-access.store</groupId>
                <artifactId>store-cassandra</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.table-access.store</groupId>
                <artifactId>store-jdbc</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.typemapping</groupId>
                <artifactId>typemapping-business</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.typemapping.store</groupId>
                <artifactId>store-cassandra</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.mizool.technology.typemapping.store</groupId>
                <artifactId>store-jdbc</artifactId>
                <version>${mizool.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.core.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-bom</artifactId>
                <version>${slf4j.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.github.mizool</groupId>
            <artifactId>mizool-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.amashchenko.maven.plugin</groupId>
                    <artifactId>gitflow-maven-plugin</artifactId>
                    <version>1.21.0</version>
                    <configuration>
                        <commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
                        <commitMessagePrefix>[gitflow] </commitMessagePrefix>
                        <gitFlowConfig>
                            <productionBranch>main</productionBranch>
                        </gitFlowConfig>
                        <noBackMerge>true</noBackMerge>
                        <noBackMergeHotfix>true</noBackMergeHotfix>
                        <preReleaseGoals>package -DperformRelease=true</preReleaseGoals>
                        <pushRemote>true</pushRemote>
                        <useSnapshotInRelease>true</useSnapshotInRelease>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>3.4.1</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
                        <sortDependencies>groupId,artifactId</sortDependencies>
                        <sortModules>true</sortModules>
                        <sortPlugins>groupId,artifactId</sortPlugins>
                        <sortProperties>true</sortProperties>
                        <createBackupFile>false</createBackupFile>
                        <expandEmptyElements>false</expandEmptyElements>
                        <keepBlankLines>true</keepBlankLines>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <lineSeparator>\n</lineSeparator>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.5.0</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>3.6.3</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>4.0.0-M12</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <toolchains>
                            <jdk>
                                <version>${base.toolchains.jdk}</version>
                            </jdk>
                        </toolchains>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>toolchain</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.18.0</version>
                    <configuration>
                        <processDependencies>${base.versionsPlugin.enabled}</processDependencies>
                        <processDependencyManagement>${base.versionsPlugin.enabled}</processDependencyManagement>
                        <processPluginDependencies>${base.versionsPlugin.enabled}</processPluginDependencies>
                        <processPluginDependenciesInPluginManagement>${base.versionsPlugin.enabled}</processPluginDependenciesInPluginManagement>
                        <ruleSet>
                            <ignoreVersions>
                                <ignoreVersion>
                                    <type>regex</type>
                                    <version>(.+-SNAPSHOT|.+-M\d)</version>
                                </ignoreVersion>
                                <ignoreVersion>
                                    <type>regex</type>
                                    <version>.+-(alpha|beta).+</version>
                                </ignoreVersion>
                            </ignoreVersions>
                        </ruleSet>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>${lombok.plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.core.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.7.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <autoPublish>true</autoPublish>
                        <deploymentName>${base.central.deploymentName}</deploymentName>
                        <publishingServerId>central</publishingServerId>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-profile</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.ekryd.sortpom</groupId>
                        <artifactId>sortpom-maven-plugin</artifactId>
                        <configuration>
                            <verifyFail>Stop</verifyFail>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
