<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.0.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>
        <!-- === Dependency Versions === -->
    </properties>

    <!-- === DependencyManagement === -->
    <dependencyManagement/>

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

    <!-- === Build Plugins === -->
    <build>
        <pluginManagement>
            <plugins>
                <!-- To package sources into the resulting JAR -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <!-- To publish to Maven Central Repository -->
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.9.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>