<?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>
    <parent>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-dependencies</artifactId>
        <version>4.0.17</version>
        <relativePath>../dropwizard-dependencies</relativePath>
    </parent>

    <artifactId>dropwizard-parent</artifactId>
    <packaging>pom</packaging>

    <name>Dropwizard Parent</name>
    <description>
        Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web
        applications.
    </description>

    <properties>
        <module.name>io.dropwizard.parent</module.name>
        <maven.compiler.release>11</maven.compiler.release>
        <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
        <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>

        <pgpverify.verifyPomFiles>false</pgpverify.verifyPomFiles>

        <surefire.argLine>-Duser.language=en -Duser.region=US -Duser.timezone=UTC</surefire.argLine>
        <agents.argLine>-javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy.version}/byte-buddy-agent-${byte-buddy.version}.jar</agents.argLine>
        <argLine>${surefire.argLine} --illegal-access=deny --add-opens java.base/java.net=ALL-UNNAMED ${agents.argLine}</argLine>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                            <doclint>none</doclint>
                            <quiet>true</quiet>
                            <notimestamp>true</notimestamp>
                            <javadocVersion>1.8</javadocVersion>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dev</id>
            <properties>
                <maven.javadoc.skip>true</maven.javadoc.skip>
                <maven.source.skip>true</maven.source.skip>
                <pgpverify.skip>true</pgpverify.skip>
                <jacoco.skip>true</jacoco.skip>
            </properties>
            <build>
                <plugins>
                    <!-- Run tests in parallel in the dev mode-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <parallel>classes</parallel>
                            <threadCount>2</threadCount>
                            <perCoreThreadCount>true</perCoreThreadCount>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-dependencies</artifactId>
                <version>4.0.17</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-XDcompilePolicy=simple</arg>
                        <arg>--should-stop=ifError=FLOW</arg>
                        <!-- When run as plugin all args must be passed together -->
                        <arg>-Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -Xep:EqualsGetClass:OFF -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=io.dropwizard -XepOpt:NullAway:ExcludedFieldAnnotations=org.mockito.Mock -XepOpt:NullAway:UnannotatedSubPackages=io.dropwizard.benchmarks</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.google.errorprone</groupId>
                            <artifactId>error_prone_core</artifactId>
                            <version>${error_prone.version}</version>
                        </path>
                        <!-- enable extended nullability checks -->
                        <path>
                            <groupId>com.uber.nullaway</groupId>
                            <artifactId>nullaway</artifactId>
                            <version>${nullaway.version}</version>
                        </path>
                        <path>
                            <groupId>jp.skypencil.errorprone.slf4j</groupId>
                            <artifactId>errorprone-slf4j</artifactId>
                            <version>0.1.28</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <dependencyConvergence />
                                <bannedDependencies>
                                    <excludes>
                                        <!-- Replaced with jakarta.activation:jakarta.activation-api -->
                                        <exclude>javax.activation:javax.activation-api</exclude>
                                        <!-- Replaced with jakarta.servlet:jakarta.servlet-api -->
                                        <exclude>javax.servlet:javax.servlet-api</exclude>
                                        <!-- Replaced with jakarta.servlet:jakarta.servlet-api -->
                                        <exclude>org.eclipse.jetty.toolchain:jetty-servlet-api</exclude>
                                        <!-- Replaced with jakarta.validation:jakarta.validation-api -->
                                        <exclude>javax.validation:validation-api</exclude>
                                        <!-- Replaced with jakarta.xml.bind:jakarta.xml.bind-api -->
                                        <exclude>javax.xml.bind:jaxb-api</exclude>
                                        <!-- This should not exist as it will force SLF4J calls to be delegated to log4j -->
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <!-- This should not exist as it will force SLF4J calls to be delegated to jul -->
                                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                                        <!-- Ensure only the slf4j binding for logback is on the classpath -->
                                        <exclude>log4j:log4j</exclude>
                                        <!-- As recommended from the slf4j guide, exclude commons-logging -->
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <!-- Replaced with jakarta.inject:jakarta.inject-api -->
                                        <exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Automatic-Module-Name>${module.name}</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.simplify4u.plugins</groupId>
                <artifactId>pgpverify-maven-plugin</artifactId>
                <configuration>
                    <keysMapLocations>
                      <keysMapLocation>/pgp-keys-map.list</keysMapLocation>
                      <keysMapLocation>${maven.multiModuleProjectDirectory}/pgp-keys-map.list</keysMapLocation>
                    </keysMapLocations>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.simplify4u</groupId>
                        <artifactId>pgp-keys-map</artifactId>
                        <version>2026.01.20</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>download-byte-buddy-agent-jar</id>
                        <goals>
                            <goal>get</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy-agent</artifactId>
                    <version>${byte-buddy.version}</version>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doclint>none</doclint>
                    <quiet>true</quiet>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>html</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
