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

    <!-- === Project Coordinates === -->
    <groupId>io.github.chrimle</groupId>
    <artifactId>chrimle-oss-parent</artifactId>
    <version>0.9.0</version>
    <packaging>pom</packaging>

    <!-- === Project Metadata === -->
    <name>Chrimle OSS Parent</name>
    <description>Maven POM Parent for Chrimle's OSS Projects.</description>
    <url>https://chrimle.github.io/Chrimle-OSS-Parent</url>
    <inceptionYear>2025</inceptionYear>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Chrimle OSS Parent</name>
        <url>https://chrimle.github.io/Chrimle-OSS-Parent/</url>
    </organization>

    <developers>
        <developer>
            <id>Chrimle</id>
            <name>Christopher Molin</name>
            <url>https://www.chrimle.com</url>
            <roles>
                <role>Lead Developer</role>
            </roles>
            <timezone>CET</timezone>
        </developer>
    </developers>

    <scm>
        <url>http://github.com/chrimle/chrimle-oss-parent/tree/main</url>
        <connection>scm:git:git://github.com/chrimle/chrimle-oss-parent.git</connection>
        <developerConnection>scm:git:ssh://github.com:chrimle/chrimle-oss-parent.git</developerConnection>
    </scm>

    <distributionManagement>
        <repository>
            <id>github</id>
            <name>GitHub Chrimle Apache Maven Packages</name>
            <url>https://maven.pkg.github.com/chrimle/chrimle-oss-parent</url>
        </repository>
        <snapshotRepository>
            <id>github</id>
            <name>GitHub Chrimle Apache Maven Snapshot Packages</name>
            <url>https://maven.pkg.github.com/chrimle/chrimle-oss-parent</url>
        </snapshotRepository>
    </distributionManagement>

    <!-- === Project Properties === -->
    <properties>
        <!-- === Meta Properties === -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- === Maven Compiler === -->
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <!-- === Plugin Versions === -->
        <error_prone_core.version>2.42.0</error_prone_core.version>
        <!-- === Dependency Versions === -->
        <apiguardian-api.version>1.1.2</apiguardian-api.version>
        <junit-bom.version>6.0.3</junit-bom.version>
    </properties>

    <!-- === DependencyManagement === -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apiguardian</groupId>
                <artifactId>apiguardian-api</artifactId>
                <version>${apiguardian-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- === Dependencies === -->
    <dependencies/>

    <!-- === Build Plugins === -->
    <build>
        <pluginManagement>
            <plugins>
                <!-- To format files according to Google Java Format -->
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <!-- To execute plugins such as Google Error Prone -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-XDcompilePolicy=simple</arg>
                            <arg>--should-stop=ifError=FLOW</arg>
                            <arg>-Xplugin:ErrorProne</arg>
                        </compilerArgs>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>com.google.errorprone</groupId>
                                <artifactId>error_prone_core</artifactId>
                                <version>${error_prone_core.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <!-- May be used for unpacking source files from dependencies -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.10.0</version>
                </plugin>
                <!-- May be used for deploying/skipping artifacts -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <!-- May be used to manage resource files -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <!-- May be used for Test Coverage Gating -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.14</version>
                </plugin>
                <!-- Common maven-jar-plugin Version -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <!-- To package sources into the resulting JAR -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <!-- To package JavaDocs into the resulting JAR -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.12.0</version>
                </plugin>
                <!-- To publish to Maven Central Repository -->
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.10.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <tokenAuth>true</tokenAuth>
                        <autoPublish>true</autoPublish>
                    </configuration>
                </plugin>
                <!-- To sign the artifact using GPG prior to publishing to Maven Central -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.8</version>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <!-- === Profiles === -->
    <profiles>
        <profile>
            <id>deploy-to-maven-central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>