<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.sigpwned</groupId>
    <artifactId>dropwizard-jose-jwt-module</artifactId>
    <version>2.1.6</version>
    <packaging>pom</packaging>
    <name>dropwizard-jose-jwt-module</name>
    <inceptionYear>2022</inceptionYear>
    <description>dropwizard-jose is an extension for Dropwizard 3.0+
    that adds JOSE (JavaScript Object Signing and Encryption) features
    to the framework, including JWT creation, signing, and
    verification.</description>
    <url>https://github.com/sigpwned/dropwizard-jose-jwt-module</url>

    <organization>
        <name>Andy Boothe</name>
        <url>https://www.sigpwned.com/</url>
    </organization>

    <scm>
        <connection>scm:git:ssh://git@github.com/sigpwned/dropwizard-jose-jwt-module.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/sigpwned/dropwizard-jose-jwt-module.git</developerConnection>
        <url>https://github.com/sigpwned/dropwizard-jose-jwt-module/tree/main</url>
        <tag>v2.1.6</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Andy Boothe</name>
            <email>andy.boothe@gmail.com</email>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/sigpwned/dropwizard-jose-jwt-module</url>
    </issueManagement>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <sonar.organization>sigpwned</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.exclusions>
          **/pom.xml
        </sonar.exclusions>

        <dropwizard.version>2.1.0</dropwizard.version>
        <nimbus.version>9.23</nimbus.version>
        <slf4j.version>1.7.36</slf4j.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.0.0</version>
                <configuration>
                    <verbose>false</verbose>
                </configuration>
                <executions>
                    <execution>
                        <id>update-file-header</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            <processStartTag>=================================LICENSE_START==================================</processStartTag>
                            <processEndTag>==================================LICENSE_END===================================</processEndTag>
                            <sectionDelimiter>====================================SECTION=====================================</sectionDelimiter>
                            <licenseName>apache_v2</licenseName>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/test/java</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/it/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <!-- https://issues.apache.org/jira/browse/SUREFIRE-2056 -->
                <version>3.0.0-M7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <testSourceDirectory>${project.basedir}/src/test/java/</testSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <!-- https://issues.apache.org/jira/browse/SUREFIRE-2056 -->
                <version>3.0.0-M7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <testSourceDirectory>${project.basedir}/src/it/java/</testSourceDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-bom</artifactId>
                <version>${dropwizard.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-dependencies</artifactId>
                <version>${dropwizard.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>dropwizard-jose-jwt</module>
        <module>dropwizard-jose-jwt-keygen-tool</module>
        <module>dropwizard-jose-jwt-example-webapp</module>
    </modules>

    <!-- For releasing to maven central -->
    <profiles>
        <profile>
            <id>release</id>
            <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>
                        <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>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
