<?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>io.github.bsels</groupId>
    <artifactId>semantic-version-maven-plugin</artifactId>
    <version>1.5.0</version>
    <packaging>maven-plugin</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>
        A Maven plugin that automates semantic versioning with Markdown‑based changelog management.
        Provides two standalone goals: create generates interactive version spec files; update applies those specs,
        bumps project versions, and merges CHANGELOG entries.
    </description>
    <url>https://github.com/bsels/semantic-version-maven-plugin</url>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://mit-license.org/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Boris Sels</name>
            <email>boris.sels@gmail.com</email>
            <organization>GitHub</organization>
            <organizationUrl>https://github.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/bsels/semantic-version-maven-plugin.git</connection>
        <developerConnection>scm:git:ssh://github.com:bsels/semantic-version-maven-plugin.git</developerConnection>
        <url>http://github.com/bsels/semantic-version-maven-plugin/tree/master</url>
    </scm>

    <properties>
        <java.version>17</java.version>
        <!--region Plugin versions -->
        <!-- https://central.sonatype.com/artifact/org.jacoco/jacoco-maven-plugin -->
        <jacoco.version>0.8.15</jacoco.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven/maven-core -->
        <maven.plugin.api.version>3.9.16</maven.plugin.api.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin -->
        <maven.enforcer.plugin.version>3.6.3</maven.enforcer.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-dependency-plugin -->
        <maven.dependency.plugin.version>3.11.0</maven.dependency.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
        <maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
        <maven.surefire.plugin.version>3.5.6</maven.surefire.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-plugin-plugin -->
        <maven.plugin.plugin.version>3.15.2</maven.plugin.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
        <maven.gpg.plugin.version>3.2.8</maven.gpg.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
        <maven.source.plugin.version>3.4.0</maven.source.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
        <central.publishing.maven.plugin.version>0.11.0</central.publishing.maven.plugin.version>
        <!--endregion-->
        <!--region Dependency versions -->
        <!-- https://central.sonatype.com/artifact/org.assertj/assertj-core -->
        <assertj.version>3.27.7</assertj.version>
        <!-- https://central.sonatype.com/artifact/org.commonmark/commonmark -->
        <commonmark.version>0.29.0</commonmark.version>
        <!-- https://central.sonatype.com/artifact/tools.jackson/jackson-bom -->
        <jackson.version>3.2.1</jackson.version>
        <!-- https://central.sonatype.com/artifact/org.junit.jupiter/junit-jupiter-api -->
        <junit.version>6.1.1</junit.version>
        <!-- https://central.sonatype.com/artifact/org.apache.maven.plugin-tools/maven-plugin-annotations -->
        <maven.plugin.version>3.15.2</maven.plugin.version>
        <!-- https://central.sonatype.com/artifact/org.mockito/mockito-core -->
        <mockito.version>5.23.0</mockito.version>
        <!--endregion-->
        <!-- region Source code info -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <!-- endregion -->
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <formats>
                                <format>HTML</format>
                            </formats>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>&gt;=17.0.0</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <release>${maven.compiler.target}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven.plugin.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <!-- This is necessary for gpg to not try to use the pinentry programs -->
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${central.publishing.maven.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>ossrh</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>validated</waitUntil>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>tools.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- endregion -->
        <!-- region Dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.plugin.api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.plugin.api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.commonmark</groupId>
            <artifactId>commonmark</artifactId>
            <version>${commonmark.version}</version>
        </dependency>
        <dependency>
            <groupId>tools.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>tools.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
        </dependency>
        <!-- endregion -->
        <!-- region Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- endregion -->
    </dependencies>

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