<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.antwerkz</groupId>
  <artifactId>antwerkz-parent</artifactId>
  <version>63</version>
  <packaging>pom</packaging>
  <name>antwerkz parent</name>
  <description>a common base for projects. provides dependency management, automatic kotlin support, and jreleaser support</description>
  <url>https://github.com/evanchooly/antwerkz-parent</url>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Justin Lee</name>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:evanchooly/antwerkz-parent.git</connection>
    <developerConnection>scm:git:git@github.com:evanchooly/antwerkz-parent.git</developerConnection>
    <url>scm:git:git@github.com:evanchooly/antwerkz-parent.git</url>
  </scm>
  <distributionManagement>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Central</name>
      <url>https://central.sonatype.com/api/v1/publisher</url>
    </repository>
    <snapshotRepository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>sonatype-snapshots</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <dokka.version>2.0.0</dokka.version>
    <kotlin.version>2.2.20</kotlin.version>
    <kotlin.compiler.jvmTarget>11</kotlin.compiler.jvmTarget>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <downloadSources>true</downloadSources>
    <nexus.url>https://oss.sonatype.org</nexus.url>
    <jreleaser.version>1.20.0</jreleaser.version>
  </properties>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>4.9.6.0</version>
          <inherited>false</inherited>
          <configuration>
            <spotbugsXmlOutputDirectory>target/spotbugs</spotbugsXmlOutputDirectory>
            <excludeFilterFile>${maven.multiModuleProjectDirectory}/config/findbugs-exclude.xml</excludeFilterFile>
            <onlyAnalyze>com.github.spotbugs.spotbugs.*</onlyAnalyze>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>2.46.1</version>
          <configuration>
            <java>
              <includes>
                <include>src/main/java/**/*.java</include>
                <include>src/test/java/**/*.java</include>
              </includes>
              <eclipse>
                <file>${maven.multiModuleProjectDirectory}/config/eclipse-format.xml</file>
              </eclipse>
              <importOrder>
                <file>${maven.multiModuleProjectDirectory}/config/eclipse.importorder</file>
              </importOrder>
              <removeUnusedImports />
              <toggleOffOn />
            </java>
            <kotlin>
              <includes>
                <include>src/main/kotlin/**/*.kt</include>
                <include>src/test/kotlin/**/*.kt</include>
              </includes>
              <ktfmt>
                <style>KOTLINLANG</style>
              </ktfmt>
              <toggleOffOn />
            </kotlin>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.4</version>
          <configuration>
            <properties>
              <failIfNoTests>true</failIfNoTests>
            </properties>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>3.5.3</version>
          <executions>
            <execution>
              <phase>test</phase>
            </execution>
          </executions>
          <configuration>
            <alwaysGenerateSurefireReport>true</alwaysGenerateSurefireReport>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.5.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.21.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.9.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.11.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.9.0</version>
        <configuration>
          <autoPublish>true</autoPublish>
          <checksums>all</checksums>
          <publishingServerId>central</publishingServerId>
          <waitUntil>published</waitUntil>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>code-audits</id>
      <activation>
        <property>
          <name>code-audits</name>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
      <properties>
        <skipTests>true</skipTests>
      </properties>
    </profile>
    <profile>
      <id>format-code</id>
      <activation>
        <property>
          <name>!code-audits</name>
        </property>
        <file>
          <exists>${maven.multiModuleProjectDirectory}/config/eclipse-format.xml</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-sources</phase>
                <goals>
                  <goal>apply</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>check formatting</id>
      <activation>
        <property>
          <name>code-audits</name>
        </property>
        <file>
          <exists>${maven.multiModuleProjectDirectory}/config/eclipse-format.xml</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-sources</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>spotbugs</id>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <spotbugsXmlOutputDirectory>target/spotbugs</spotbugsXmlOutputDirectory>
                  <excludeFilterFile>${maven.multiModuleProjectDirectory}/config/findbugs-exclude.xml</excludeFilterFile>
                  <onlyAnalyze>com.github.spotbugs.spotbugs.*</onlyAnalyze>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>enable-kotlin</id>
      <activation>
        <file>
          <exists>src/main/kotlin</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-maven-plugin</artifactId>
            <version>${kotlin.version}</version>
            <executions>
              <execution>
                <id>compile</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <configuration>
                  <sourceDirs>
                    <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                    <sourceDir>${project.basedir}/src/main/java</sourceDir>
                  </sourceDirs>
                </configuration>
              </execution>
              <execution>
                <id>test-compile</id>
                <goals>
                  <goal>test-compile</goal>
                </goals>
                <configuration>
                  <sourceDirs>
                    <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                    <sourceDir>${project.basedir}/src/test/java</sourceDir>
                  </sourceDirs>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <jvmTarget>${kotlin.compiler.jvmTarget}</jvmTarget>
              <javaParameters>true</javaParameters>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.14.0</version>
            <executions>
              <execution>
                <id>default-compile</id>
                <phase>none</phase>
              </execution>
              <execution>
                <id>default-testCompile</id>
                <phase>none</phase>
              </execution>
              <execution>
                <id>java-compile</id>
                <phase>compile</phase>
                <goals>
                  <goal>compile</goal>
                </goals>
              </execution>
              <execution>
                <id>java-test-compile</id>
                <phase>test-compile</phase>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <configuration>
                  <skip>${maven.test.skip}</skip>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <source>${kotlin.compiler.jvmTarget}</source>
              <target>${kotlin.compiler.jvmTarget}</target>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jetbrains.dokka</groupId>
            <artifactId>dokka-maven-plugin</artifactId>
            <version>${dokka.version}</version>
            <executions>
              <execution>
                <phase>prepare-package</phase>
                <goals>
                  <goal>dokka</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <skip>${deploy.skip}</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
            <executions>
              <execution>
                <id>dokka-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <classesDirectory>${project.basedir}/target/dokka/</classesDirectory>
                  <classifier>javadoc</classifier>
                  <outputDirectory>target</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>download config</id>
      <activation>
        <file>
          <missing>${maven.multiModuleProjectDirectory}/config</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.googlecode.maven-download-plugin</groupId>
            <artifactId>download-maven-plugin</artifactId>
            <version>1.13.0</version>
            <executions>
              <execution>
                <id>install eclipse-format.xml</id>
                <phase>initialize</phase>
                <goals>
                  <goal>wget</goal>
                </goals>
                <configuration>
                  <url>https://raw.githubusercontent.com/evanchooly/antwerkz-parent/main/config/eclipse-format.xml</url>
                </configuration>
              </execution>
              <execution>
                <id>install eclipse.importorder</id>
                <phase>initialize</phase>
                <goals>
                  <goal>wget</goal>
                </goals>
                <configuration>
                  <url>https://raw.githubusercontent.com/evanchooly/antwerkz-parent/main/config/eclipse.importorder</url>
                </configuration>
              </execution>
              <execution>
                <id>install findbugs-exclude.xml</id>
                <phase>initialize</phase>
                <goals>
                  <goal>wget</goal>
                </goals>
                <configuration>
                  <url>https://raw.githubusercontent.com/evanchooly/antwerkz-parent/main/config/findbugs-exclude.xml</url>
                </configuration>
              </execution>
            </executions>
            <inherited>false</inherited>
            <configuration>
              <outputDirectory>${maven.multiModuleProjectDirectory}/config</outputDirectory>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>publication</id>
      <activation>
        <property>
          <name>release</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.8</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.6.1</version>
            <executions>
              <execution>
                <id>enforce-environment-variable-is-set</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireEnvironmentVariable>
                      <variableName>SONATYPE_USERNAME</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>SONATYPE_TOKEN</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>MAVEN_GPG_PASSPHRASE</variableName>
                    </requireEnvironmentVariable>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
              <execution>
                <id>copy-license-file</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <sourceFile>${maven.multiModuleProjectDirectory}/LICENSE</sourceFile>
                  <destinationFile>${project.build.outputDirectory}/META-INF/LICENSE-${project.artifactId}</destinationFile>
                </configuration>
              </execution>
            </executions>
            <inherited>false</inherited>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <skipTests>true</skipTests>
      </properties>
    </profile>
    <profile>
      <id>jreleaser</id>
      <activation>
        <property>
          <name>jreleaser</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <inherited>false</inherited>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${local.repository.path}</directory>
                </fileset>
              </filesets>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>generate-repository-directories</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <mkdir dir="${local.repository.path}/" />
                  </target>
                </configuration>
              </execution>
            </executions>
            <inherited>false</inherited>
          </plugin>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.6.1</version>
            <executions>
              <execution>
                <id>enforce-environment-variable-is-set</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_GITHUB_TOKEN</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_GPG_PASSPHRASE</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_GPG_PUBLIC_KEY</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_GPG_SECRET_KEY</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_NEXUS2_TOKEN</variableName>
                    </requireEnvironmentVariable>
                    <requireEnvironmentVariable>
                      <variableName>JRELEASER_NEXUS2_USERNAME</variableName>
                    </requireEnvironmentVariable>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
              <execution>
                <id>copy-license-file</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <sourceFile>${maven.multiModuleProjectDirectory}/LICENSE</sourceFile>
                  <destinationFile>${project.build.outputDirectory}/META-INF/LICENSE-${project.artifactId}</destinationFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.jreleaser</groupId>
            <artifactId>jreleaser-maven-plugin</artifactId>
            <version>${jreleaser.version}</version>
            <configuration>
              <jreleaser>
                <project>
                  <copyright>-</copyright>
                  <java>
                    <multiProject>true</multiProject>
                  </java>
                  <snapshot>
                    <label>${jreleaser.tag.name}</label>
                  </snapshot>
                </project>
                <announce>
                  <active>${jreleaser.announce}</active>
                  <bluesky>
                    <active>${jreleaser.announce.bluesky}</active>
                    <host>https://bsky.social/</host>
                    <handle>${env.BLUESKY_USERNAME}</handle>
                    <password>${env.BLUESKY_PASSWORD}</password>
                    <status>{{projectName}} {{projectVersion}} has been released! {{releaseNotesUrl}}</status>
                  </bluesky>
                  <mastodon>
                    <active>${jreleaser.announce.mastodon}</active>
                    <host>https://mastodon.social</host>
                    <accessToken>${env.MASTODON_ACCESS_KEY}</accessToken>
                    <status>{{projectName}} {{projectVersion}} has been released! {{releaseNotesUrl}}</status>
                  </mastodon>
                </announce>
                <signing>
                  <active>ALWAYS</active>
                  <armored>true</armored>
                </signing>
                <deploy>
                  <maven>
                    <pomchecker>
                      <failOnWarning>false</failOnWarning>
                      <failOnError>false</failOnError>
                    </pomchecker>
                    <mavenCentral>
                      <release-deploy>
                        <active>RELEASE</active>
                        <url>https://central.sonatype.com/api/v1/publisher</url>
                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                      </release-deploy>
                    </mavenCentral>
                    <nexus2>
                      <snapshot-deploy>
                        <active>SNAPSHOT</active>
                        <snapshotUrl>https://central.sonatype.com/repository/maven-snapshots/</snapshotUrl>
                        <applyMavenCentralRules>true</applyMavenCentralRules>
                        <snapshotSupported>true</snapshotSupported>
                        <closeRepository>true</closeRepository>
                        <releaseRepository>true</releaseRepository>
                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                      </snapshot-deploy>
                    </nexus2>
                  </maven>
                </deploy>
                <release>
                  <github>
                    <releaseName>Release {{projectVersionNumber}}</releaseName>
                    <skipTag>true</skipTag>
                    <skipRelease>${snapshot.build}</skipRelease>
                    <milestone>
                      <name>{{projectVersionNumber}}</name>
                    </milestone>
                    <issues>
                      <enabled>true</enabled>
                    </issues>
                    <overwrite>true</overwrite>
                    <update>
                      <enabled>true</enabled>
                      <sections>
                        <section>TITLE</section>
                        <section>BODY</section>
                        <section>ASSETS</section>
                      </sections>
                    </update>
                    <prerelease>
                      <pattern>.*-SNAPSHOT</pattern>
                    </prerelease>
                    <commitAuthor>
                      <name>${release.author}</name>
                      <email>${release.email}</email>
                    </commitAuthor>
                    <changelog>
                      <links>true</links>
                      <formatted>ALWAYS</formatted>
                      <preset>gitmoji</preset>
                      <contributorsTitleFormat>### Contributors'</contributorsTitleFormat>
                      <append>
                        <enabled>true</enabled>
                      </append>
                      <contributors>
                        <format>- {{contributorName}} ({{contributorUsernameAsLink}})</format>
                      </contributors>
                      <hide>
                        <contributors>
                          <contributor>[bot]</contributor>
                        </contributors>
                      </hide>
                      <categories>
                        <category>
                          <title>🚀 Features</title>
                          <key>features</key>
                          <labels>feature,enhancement</labels>
                          <order>1</order>
                        </category>
                        <category>
                          <title>🐛 Bug Fixes</title>
                          <key>fixes</key>
                          <format>- {{commitShortHash}} {{commitBody}}</format>
                          <labels>bug,fix</labels>
                          <order>2</order>
                        </category>
                      </categories>
                    </changelog>
                  </github>
                </release>
              </jreleaser>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>local-release</id>
          <url>file://${local.repository.path}/</url>
        </repository>
        <snapshotRepository>
          <id>local-snapshot</id>
          <url>file://${local.repository.path}/</url>
        </snapshotRepository>
      </distributionManagement>
      <properties>
        <release.author>Justin Lee (@evanchooly)</release.author>
        <release.email>jlee@antwerkz.com</release.email>
        <local.repository.path>${maven.multiModuleProjectDirectory}/target/staging-deploy</local.repository.path>
        <snapshot.build>true</snapshot.build>
        <skipTests>true</skipTests>
        <jreleaser.announce>NEVER</jreleaser.announce>
        <jreleaser.announce.bluesky>NEVER</jreleaser.announce.bluesky>
        <jreleaser.announce.mastodon>NEVER</jreleaser.announce.mastodon>
        <jreleaser.nexus.deploy>ALWAYS</jreleaser.nexus.deploy>
        <jreleaser.releaseRepository>true</jreleaser.releaseRepository>
        <jreleaser.tag.name>${project.version}</jreleaser.tag.name>
      </properties>
    </profile>
  </profiles>
</project>