<?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>com.boozallen.aissemble</groupId>
    <artifactId>aissemble-parent</artifactId>
    <version>5</version>

    <packaging>pom</packaging>

    <name>aiSSEMBLE Parent POM</name>
    <description>Provides a base configuration for aiSSEMBLE project builds</description>
    <url>https://github.com/boozallen/aissemble-parent</url>
    <inceptionYear>2024</inceptionYear>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/boozallen/aissemble-parent/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/boozallen/aissemble-parent.git</connection>
        <developerConnection>scm:git:https://github.com/boozallen/aissemble-parent.git</developerConnection>
        <url>https://github.com/boozallen/aissemble-parent</url>
        <tag>aissemble-parent-5</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ghcr.io</id>
            <url>https://maven.pkg.github.com/boozallen/aissemble-parent</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
        </repository>
    </distributionManagement>

    <organization>
        <name>Booz Allen Hamilton Inc.</name>
        <url>https://www.boozallen.com</url>
    </organization>

    <developers>
        <developer>
            <id>aissemble</id>
            <name>aiSSEMBLE Baseline Community</name>
            <organization>Booz Allen Hamilton</organization>
            <organizationUrl>https://boozallen.com</organizationUrl>
            <email>aissemble@bah.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Booz Allen Public License v1.0</name>
            <url>https://github.com/boozallen/Public-License/blob/master/LICENSE.md</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <version.license.plugin>2.4.0</version.license.plugin>
        <version.maven.clean.plugin>3.4.0</version.maven.clean.plugin>
        <version.maven.compiler.plugin>3.13.0</version.maven.compiler.plugin>
        <version.maven.dependency.plugin>3.6.1</version.maven.dependency.plugin>
        <version.maven.deploy.plugin>3.1.3</version.maven.deploy.plugin>
        <version.maven.enforcer.plugin>3.5.0</version.maven.enforcer.plugin>
        <version.maven.gpg.plugin>3.2.6</version.maven.gpg.plugin>
        <version.maven.install.plugin>3.1.3</version.maven.install.plugin>
        <version.maven.javadoc.plugin>3.10.0</version.maven.javadoc.plugin>
        <version.maven.jar.plugin>3.4.2</version.maven.jar.plugin>
        <version.maven.release.plugin>3.1.1</version.maven.release.plugin>
        <version.maven.resources.plugin>3.3.1</version.maven.resources.plugin>
        <version.maven.site.plugin>4.0.0-M16</version.maven.site.plugin>
        <version.maven.source.plugin>3.3.1</version.maven.source.plugin>
        <version.maven.surefire.plugin>3.5.0</version.maven.surefire.plugin>
        <version.nexus.staging.plugin>1.7.0</version.nexus.staging.plugin>
        <version.python.default>3.11.4</version.python.default>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.maven.clean.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven.compiler.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${version.maven.dependency.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.maven.deploy.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version.maven.gpg.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.maven.install.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.maven.javadoc.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.maven.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.maven.release.plugin}</version>
                    <configuration>
                        <releaseProfiles>ossrh-release</releaseProfiles>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.maven.resources.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.maven.site.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.maven.source.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven.surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.maven.enforcer.plugin}</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>3.8.6</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>enforce-java</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireJavaVersion>
                                        <version>${maven.compiler.source}</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${version.nexus.staging.plugin}</version>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <!-- Automatically release staging repository and make deployed artifacts available on
                             Maven Central. This mitigates the need to manually log into the OSSRH Nexus instance
                             and release the staging repository -->
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${version.license.plugin}</version>
                    <configuration>
                        <licenseName>booz-allen-public-license</licenseName>
                        <licenseResolver>classpath://com/boozallen</licenseResolver>
                        <excludes>
                            <exclude>**/*.json</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>update-file-header</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <canUpdateCopyright>true</canUpdateCopyright>
                                <ignoreLastDate>true</ignoreLastDate>
                            </configuration>
                        </execution>
                        <execution>
                            <id>update-project-license</id>
                            <goals>
                                <goal>update-project-license</goal>
                            </goals>
                            <configuration>
                                <force>true</force>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.boozallen.aissemble</groupId>
                            <artifactId>booz-allen-licenses</artifactId>
                            <version>1.2.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${version.maven.dependency.plugin}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>ossrh-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</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>
