<?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/maven-v4_0_0.xsd">

  <!-- ==================================================================== -->
  <!-- Build requires Java SE 21 or later -->
  <!-- ==================================================================== -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.joda</groupId>
  <artifactId>joda-money</artifactId>
  <packaging>jar</packaging>
  <name>Joda-Money</name>
  <version>2.0.2</version>
  <description>Money representation and formatting, compatible with Java 21+</description>
  <url>https://www.joda.org/joda-money/</url>

  <!-- ==================================================================== -->
  <inceptionYear>2009</inceptionYear>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>Joda.org</name>
    <url>https://www.joda.org</url>
  </organization>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/JodaOrg/joda-money/issues/</url>
  </issueManagement>
  <scm>
    <connection>scm:git:https://github.com/JodaOrg/joda-money.git</connection>
    <developerConnection>scm:git:https://github.com/JodaOrg/joda-money.git</developerConnection>
    <url>https://github.com/JodaOrg/joda-money</url>
    <tag>v2.0.2</tag>
  </scm>

  <!-- ==================================================================== -->
  <developers>
    <developer>
      <id>jodastephen</id>
      <name>Stephen Colebourne</name>
      <roles>
        <role>Project Lead</role>
      </roles>
      <timezone>0</timezone>
      <url>https://github.com/jodastephen</url>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Ashish Kumar</name>
      <url>https://github.com/ashish12</url>
    </contributor>
    <contributor>
      <name>Tim Molter</name>
    </contributor>
    <contributor>
      <name>Michael Bailey</name>
      <url>https://github.com/yogurtearl</url>
    </contributor>
    <contributor>
      <name>Sarp Güney Başaraner</name>
      <url>https://github.com/sgbasaraner</url>
    </contributor>
    <contributor>
      <name>Gabriel Bauman</name>
      <url>https://github.com/gabrielbauman</url>
    </contributor>
    <contributor>
      <name>Joe Bauser</name>
      <url>https://github.com/coderjoe</url>
    </contributor>
    <contributor>
      <name>Ian Ferguson</name>
      <url>https://github.com/ianferguson</url>
    </contributor>
    <contributor>
      <name>Lukas Vogel</name>
      <url>https://github.com/lukedirtwalker</url>
    </contributor>
    <contributor>
      <name>Michael Weiss</name>
      <url>https://github.com/MiWeiss</url>
    </contributor>
  </contributors>

  <!-- ==================================================================== -->
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <targetPath>META-INF</targetPath>
        <directory>${project.basedir}</directory>
        <includes>
          <include>LICENSE.txt</include>
          <include>NOTICE.txt</include>
        </includes>
      </resource>
    </resources>
    <!-- define build -->
    <plugins>
      <!-- Cleanup any mess -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <executions>
          <execution>
            <id>clean-mess</id>
            <phase>initialize</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
            <excludeDefaultDirectories>true</excludeDefaultDirectories>
            <filesets>
              <fileset>
                <directory>src/test/java</directory>
                <includes>
                  <include>module-info.java</include>
                </includes>
              </fileset>
              <fileset>
                <directory>target/test-classes</directory>
                <useDefaultExcludes>false</useDefaultExcludes>
                <includes>
                  <include>module-info.class</include>
                </includes>
              </fileset>
            </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Enforce Maven 3.8.0 and Java 21+ -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.8.0</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[21,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Setup OSGi bundle data -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${maven-bundle-plugin.version}</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <instructions>
                <Specification-Version>${project.version}</Specification-Version>
                <Export-Package>${joda.osgi.packages}</Export-Package>
                <Require-Capability>${joda.osgi.require.capability}</Require-Capability>
              </instructions>
              <supportIncrementalBuild>true</supportIncrementalBuild>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Setup Jar file manifest entries -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <!-- Setup Javadoc jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <!-- Javadoc uses source 21 to pickup the module settings -->
        <configuration>
          <source>21</source>
        </configuration>
      </plugin>
      <!-- Setup source jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Setup Checkstyle, excluding module-info -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>run-checkstyle</id>
            <phase>process-sources</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>module-info.java</excludes>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- Setup JaCoCo code coverage -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Release to GitHub -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <arguments>-Doss.repo</arguments>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <localCheckout>true</localCheckout>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.kohsuke</groupId>
            <artifactId>github-api</artifactId>
            <version>${github-api.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
    <!-- Manage plugin versions -->
    <pluginManagement>
      <plugins>
        <!-- Maven build and reporting plugins (alphabetical) -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${maven-assembly-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <version>${maven-changes-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${maven-jxr-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven-plugin-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${maven-pmd-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-repository-plugin</artifactId>
          <version>${maven-repository-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven-surefire-report-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-toolchains-plugin</artifactId>
          <version>${maven-toolchains-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-maven-plugin.version}</version>
        </plugin>
        <!-- Setup site with reflow maven skin -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <configuration>
            <skipDeploy>true</skipDeploy>
          </configuration>
          <executions>
            <execution>
              <id>attach-descriptor</id>
              <goals>
                <goal>attach-descriptor</goal>
              </goals>
              <!-- https://issues.apache.org/jira/browse/MSITE-639 -->
              <configuration>
                <locales>en,de</locales>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.joda.external</groupId>
              <artifactId>reflow-velocity-tools</artifactId>
              <version>1.2</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <!-- ==================================================================== -->
  <dependencies>
    <dependency>
      <groupId>org.joda</groupId>
      <artifactId>joda-convert</artifactId>
      <version>${joda-convert.version}</version>
      <scope>compile</scope>
      <optional>true</optional><!-- mandatory in Scala -->
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- ==================================================================== -->
  <reporting>
    <plugins>
      <!-- Setup standard project info reports -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>ci-management</report>
              <report>dependencies</report>
              <report>dependency-info</report>
              <report>issue-management</report>
              <report>licenses</report>
              <report>team</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Setup Checkstyle report, excluding module-info -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <configuration>
          <includeResources>false</includeResources>
          <includeTestResources>false</includeTestResources>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
          <excludes>module-info.java</excludes>
        </configuration>
      </plugin>
      <!-- Setup Javadoc report -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <source>21</source>
        </configuration>
      </plugin>
      <!-- Setup Surefire report -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${maven-surefire-report-plugin.version}</version>
        <configuration>
          <showSuccess>true</showSuccess>
        </configuration>
      </plugin>
      <!-- Setup changes (release notes) -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${maven-changes-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Setup PMD report, excluding module-info -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
        <configuration>
          <minimumTokens>100</minimumTokens>
          <targetJdk>${maven.compiler.release}</targetJdk>
          <excludes>
            <exclude>module-info.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <!-- Setup spotbugs report -->
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs-maven-plugin.version}</version>
      </plugin>
      <!-- Setup JaCoCo report -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <!-- ==================================================================== -->
  <distributionManagement>
    <repository>
      <id>sonatype-joda-staging</id>
      <name>Sonatype OSS staging repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      <layout>default</layout>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>sonatype-joda-snapshot</id>
      <name>Sonatype OSS snapshot repository</name>
      <url>https://oss.sonatype.org/content/repositories/joda-snapshots</url>
      <layout>default</layout>
    </snapshotRepository>
    <downloadUrl>https://oss.sonatype.org/content/repositories/joda-releases</downloadUrl>
  </distributionManagement>

  <!-- ==================================================================== -->
  <profiles>
    <!-- Aim of this profile is to test the project three times. -->
    <!-- First, with main code on the modulepath and test code on the classpath (test lifecycle phase). -->
    <!-- Then, with both main and test code on the classpath (test lifecycle phase). -->
    <!-- Then, with both main and test code on the modulepath (integration-test lifecycle phase). -->
    <!-- The last of these is achieved by a Maven workaround/hack. -->
    <!-- When maven-compiler-plugin testCompile runs with two module-info.java files with the same module name -->
    <!-- the code in both src/test/java and src/main/java is compiled into target/test-classes. -->
    <!-- This is a bug, but we can use it to our advantage - all we have to do is patch in src/main/resources -->
    <profile>
      <id>extended-test</id>
      <activation>
        <property>
          <name>extended-test</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!--- Three runs of surefire -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <!-- test with main code on the modulepath and test code on the classpath -->
              <execution>
                <id>default-test</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <useModulePath>true</useModulePath>
                </configuration>
              </execution>
              <!-- test with both main and test code on the classpath -->
              <execution>
                <id>test-module-classpath</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <useModulePath>false</useModulePath>
                </configuration>
              </execution>
              <!-- test with both main and test code on the modulepath (as a single patched module using src/test/java/module-info.java) -->
              <!-- by this point, target/test-classes contains the complied form of src/test/java and src/main/java -->
              <!-- patch-module is used to add the missing src/main/resources without copying it -->
              <execution>
                <id>test-module-whitebox</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>integration-test</phase>
                <configuration>
                  <argLine>--patch-module org.joda.money=src/main/resources</argLine>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Avoid issues with IntelliJ and Eclipse by adding the module-info dynamically -->
          <!-- Tests in either IDE will operate as classpath tests -->
          <!-- Tests in Maven will operate as whitebox tests -->
          <!-- This approach keeps IDEs happy, wheras using build-helper-plugin does not -->
          <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <version>${copy-rename-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>activate-module-info</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <sourceFile>src/test-whitebox/module-info.java</sourceFile>
                  <destinationFile>src/test/java/module-info.java</destinationFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Cleanup dynamic module-info -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <executions>
              <execution>
                <id>deactivate-module-info</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
                <configuration>
                <excludeDefaultDirectories>true</excludeDefaultDirectories>
                <filesets>
                  <fileset>
                    <directory>src/test/java</directory>
                    <includes>
                      <include>module-info.java</include>
                    </includes>
                  </fileset>
                  <fileset>
                    <directory>target/test-classes</directory>
                    <useDefaultExcludes>false</useDefaultExcludes>
                    <includes>
                      <include>module-info.class</include>
                    </includes>
                  </fileset>
                </filesets>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- An additional testCompile step. -->
          <!-- This recompiles the test code after src/test/java/module-info.java has been added as a test source by build-helper -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <executions>
              <execution>
                <id>test-module-whitebox</id>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <phase>pre-integration-test</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Hack to allow IntelliJ testing to work, as it doesn't seems to handle 'requires static' properly -->
    <profile>
      <id>intellij-idea</id>
      <activation>
        <property>
          <name>idea.maven.embedder.version</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>--add-modules org.joda.convert</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Check for incompatible changes, use `mvn revapi:check -Dcompat -DoldVersion=xxx` -->
    <profile>
      <id>compat</id>
      <activation>
        <property>
          <name>compat</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-maven-plugin</artifactId>
            <version>${revapi-maven-plugin.version}</version>
            <dependencies>
              <dependency>
                <groupId>org.revapi</groupId>
                <artifactId>revapi-java</artifactId>
                <version>${revapi-java.version}</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>check</id>
                <goals><goal>check</goal></goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Main deployment profile, activated by -Doss.repo -->
    <profile>
      <id>release-artifacts</id>
      <activation>
        <property>
          <name>oss.repo</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!-- Create dist files -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <attach>false</attach>
              <descriptors>
                <descriptor>src/main/assembly/dist.xml</descriptor>
              </descriptors>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>install</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Sign artifacts -->
          <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>
                <configuration>
                  <signer>bc</signer>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Use nexus plugin to directly release -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <serverId>sonatype-joda-staging</serverId>
              <autoReleaseAfterClose>${joda.nexus.auto.release}</autoReleaseAfterClose>
              <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
              <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
            </configuration>
          </plugin>
          <!-- Release dist files to GitHub -->
          <!-- This will create a tag on GitHub on deploy -->
          <!-- The release commit must have been pushed first -->
          <plugin>
            <groupId>de.jutzig</groupId>
            <artifactId>github-release-plugin</artifactId>
            <version>${github-release-plugin.version}</version>
            <configuration>
              <releaseName>Release v${project.version}</releaseName>
              <description>See the [change notes](https://www.joda.org/joda-money/changes-report.html#a${project.version}) for more information.</description>
              <tag>v${project.version}</tag>
              <overwriteArtifact>true</overwriteArtifact>
              <fileSets>
                <fileSet>
                  <directory>${project.build.directory}</directory>
                  <includes>
                    <include>joda-money*-dist.tar.gz</include>
                    <include>joda-money*-dist.zip</include>
                  </includes>
                </fileSet>
              </fileSets>
            </configuration>
            <executions>
              <execution>
                <id>github-releases</id>
                <phase>deploy</phase>
                <goals>
                  <goal>release</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <!-- ==================================================================== -->
  <properties>
    <!-- Dependencies -->
    <assertj.version>3.27.0</assertj.version>
    <joda-convert.version>3.0.1</joda-convert.version>
    <junit.version>5.11.4</junit.version>

    <!-- Common control parameters -->
    <joda.osgi.packages>org.joda.money.*</joda.osgi.packages>
    <joda.osgi.require.capability>osgi.ee;filter:="(&amp;(osgi.ee=JavaSE)(version=${maven.compiler.release}))"</joda.osgi.require.capability>
    <joda.nexus.auto.release>true</joda.nexus.auto.release>

    <!-- Plugin version numbers -->
    <maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
    <maven-bundle-plugin.version>6.0.0</maven-bundle-plugin.version>
    <maven-changes-plugin.version>2.12.1</maven-changes-plugin.version>
    <maven-checkstyle-plugin.version>3.4.0</maven-checkstyle-plugin.version><!-- 3.6.0 fails in reporting -->
    <maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
    <maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
    <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-install-plugin.version>3.1.3</maven-install-plugin.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
    <maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version>
    <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throws NoSuchMethodException -->
    <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 has error -->
    <maven-release-plugin.version>3.1.1</maven-release-plugin.version>
    <maven-repository-plugin.version>2.4</maven-repository-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throws ComponentLookupException -->
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
    <maven-surefire-report-plugin.version>3.5.2</maven-surefire-report-plugin.version>
    <maven-toolchains-plugin.version>3.2.0</maven-toolchains-plugin.version>
    <copy-rename-maven-plugin.version>1.0</copy-rename-maven-plugin.version>
    <github-api.version>1.326</github-api.version>
    <github-release-plugin.version>1.6.0</github-release-plugin.version>
    <jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
    <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
    <revapi-maven-plugin.version>0.11.1</revapi-maven-plugin.version>
    <revapi-java.version>0.15.1</revapi-java.version>
    <spotbugs-maven-plugin.version>4.8.6.6</spotbugs-maven-plugin.version>

    <!-- Properties for maven-compiler-plugin -->
    <maven.compiler.release>21</maven.compiler.release>
    <maven.compiler.fork>true</maven.compiler.fork>

    <!-- Properties for maven-javadoc-plugin -->
    <author>false</author>
    <notimestamp>true</notimestamp>
    <doclint>none</doclint>

    <!-- Properties for maven-checkstyle-plugin -->
    <checkstyle.version>10.18.2</checkstyle.version>
    <checkstyle.config.location>src/main/checkstyle/checkstyle.xml</checkstyle.config.location>
    <linkXRef>false</linkXRef>

    <!-- Other properties -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
</project>
