<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    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>

    <!-- Artifact -->
    <groupId>gov.hhs.aspr.ms</groupId>
    <artifactId>util</artifactId>
    <version>4.1.1</version>
    <packaging>jar</packaging>

    <name>Modeling Utils</name>
    <description>A suite of utility methods that are useful for simulation frameworks.</description>
    <url>https://github.com/HHS/ASPR-ms-util</url>

    <!-- License Information -->
    <licenses>
        <license>
            <name>GNU GENERAL PUBLIC LICENSE v3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
        </license>
        <license>
            <name>Vulnerability Disclosure Policy</name>
            <url>https://www.hhs.gov/vulnerability-disclosure-policy/index.html</url>
        </license>
    </licenses>

    <!-- Developers -->
    <developers>
        <developer>
            <name>Shawn Hatch</name>
            <email>shawn.r.hatch@leidos.com</email>
            <organization>Leidos</organization>
            <organizationUrl>https://www.leidos.com</organizationUrl>
        </developer>
        <developer>
            <name>Zachary Bischoff</name>
            <organization>Leidos</organization>
            <email>zachary.bischoff@leidos.com</email>
            <organizationUrl>https://www.leidos.com</organizationUrl>
        </developer>
    </developers>

    <!-- SCM Information -->
    <scm>
        <connection>scm:git:git://github.com/HHS/ASPR-ms-util.git</connection>
        <developerConnection>scm:git:ssh://github.com:HHS/ASPR-ms-util.git</developerConnection>
        <url>https://github.com/HHS/ASPR-ms-util/tree/main</url>
    </scm>

    <!-- Properties -->
    <properties>
        <!-- basic project properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <!-- <gpg.executable>gpg2</gpg.executable> -->
        <gpg.useAgent>false</gpg.useAgent>

        <!-- plugin versions -->
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
        <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>3.2.2</maven-gpg-plugin.version>

        <!-- dependency versions-->
        <commons-math3.version>3.6.1</commons-math3.version>
        <jcip-annotations.version>1.0</jcip-annotations.version>
        <junit-jupiter-engine.version>5.10.2</junit-jupiter-engine.version>
        <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
    </properties>

    <!-- Dependencies -->
    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math3.version}</version>
        </dependency>
        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
            <version>${jcip-annotations.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter-engine.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-jupiter-engine.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-maven-plugin.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- Configure Build -->
    <build>
        <plugins>
            <!-- Runs unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>AT_*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <!-- Attaches source jar to project -->
            <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.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.4.0</version>
                <extensions>true</extensions>
                <configuration>
                  <publishingServerId>central</publishingServerId>
                  <tokenAuth>true</tokenAuth>
                </configuration>
              </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <!--Attaches javadoc jar to project -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <doclint>all,-missing</doclint>
                            <author>false</author>
                            <additionalJOptions>
                                <additionalJOption>-Xmaxerrs</additionalJOption>
                                <additionalJOption>65536</additionalJOption>
                                <additionalJOption>-Xmaxwarns</additionalJOption>
                                <additionalJOption>65536</additionalJOption>
                            </additionalJOptions>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <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>
                            </execution>
                        </executions>
                        <configuration>
                                <useAgent>false</useAgent>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jacoco</id>
            <build>
                <plugins>
                    <!-- Jacoco Coverage Check -->
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>default-prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <limits>
                                                <limit>
                                                    <counter>LINE</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.0</minimum>
                                                </limit>
                                                <limit>
                                                    <counter>BRANCH</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.0</minimum>
                                                </limit>
                                                <limit>
                                                    <counter>INSTRUCTION</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.0</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>