<?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>
  <parent>
    <groupId>dev.ikm.build</groupId>
    <artifactId>parent</artifactId>
    <version>1.73.0</version>
  </parent>
  <artifactId>java-parent</artifactId>
  <packaging>pom</packaging>
  <name>Java Parent</name>
  <description>The Java Parent that helps to define the build processes that should be used across projects. This is versioned
        and if you want to use a different version of the pom, you can simply change the parent version, and it will
        adjust all the properties being used throughout, as the properties and plugins will be inherited by
        subprojects.</description>
  <properties>
    <maven.resources-plugin.version>3.3.1</maven.resources-plugin.version>
    <maven.surefire-plugin.version>3.5.3</maven.surefire-plugin.version>
    <maven.surefire-report-plugin.version>3.5.3</maven.surefire-report-plugin.version>
    <maven.failsafe-plugin.version>3.5.3</maven.failsafe-plugin.version>
    <maven.surefire-junit-platform.version>3.5.3</maven.surefire-junit-platform.version>
    <maven.compiler-plugin.version>3.14.0</maven.compiler-plugin.version>
    <maven.war-plugin.version>3.4.0</maven.war-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
    <record-builder-core.version>34</record-builder-core.version>
    <maven-dependency-analyzer.version>1.16.0</maven-dependency-analyzer.version>
    <maven.checkstyle-plugin.version>3.6.0</maven.checkstyle-plugin.version>
    <checkstyle.version>10.23.1</checkstyle.version>
    <maven-pmd-plugin.version>3.28.0</maven-pmd-plugin.version>
    <maven.jacoco-plugin.version>0.8.14</maven.jacoco-plugin.version>
    <maven.spotbugs-plugin.version>4.9.8.1</maven.spotbugs-plugin.version>
    <jlgrock.checkstyle.version>2.1.0</jlgrock.checkstyle.version>
    <maven.pom-check-maven-plugin.version>1.0.0</maven.pom-check-maven-plugin.version>
    <junit.version>6.0.0</junit.version>
    <slf4j.version>2.0.17</slf4j.version>
    <log4j.version>3.0.0-alpha1</log4j.version>
    <eclipse-plugin.version>1.0.0</eclipse-plugin.version>
    <asm.version>9.9</asm.version>
    <compiler.args></compiler.args>
    <surefire.args></surefire.args>
    <failsafe.args></failsafe.args>
    <preview.jvmArgs></preview.jvmArgs>
    <javadoc.args></javadoc.args>
    <surefireArgLine>${surefire.args}</surefireArgLine>
    <failsafeArgLine>${failsafe.args}</failsafeArgLine>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-bom</artifactId>
        <version>${slf4j.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-bom</artifactId>
        <version>${log4j.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm-commons</artifactId>
              <version>${asm.version}</version>
            </dependency>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm-tree</artifactId>
              <version>${asm.version}</version>
            </dependency>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm-util</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <release>${java.version}</release>
            <compilerArgs>${compiler.args}</compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire-plugin.version}</version>
          <configuration>
            <useModulePath>true</useModulePath>
            <argLine>@{surefireArgLine}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.failsafe-plugin.version}</version>
          <configuration>
            <useModulePath>true</useModulePath>
            <argLine>@{failsafeArgLine}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <failOnError>false</failOnError>
            <doclint>none</doclint>
            <additionalJOptions>
              <additionalJOption>${preview.jvmArgs}</additionalJOption>
              <additionalJOption>${javadoc.args}</additionalJOption>
            </additionalJOptions>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven.war-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven.dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${maven-pmd-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven.checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.github.jlgrock</groupId>
              <artifactId>personal-checkstyle</artifactId>
              <version>${jlgrock.checkstyle.version}</version>
              <type>zip</type>
              <classifier>checkstyle-resources</classifier>
            </dependency>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${maven.jacoco-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${maven.spotbugs-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven.site.plugin}</version>
        </plugin>
        <plugin>
          <groupId>com.github.jlgrock</groupId>
          <artifactId>pom-check-maven-plugin</artifactId>
          <version>${maven.pom-check-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven.surefire-report-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <release>${java.version}</release>
          <fork>true</fork>
          <annotationProcessorPaths>
            <annotationProcessorPath>
              <groupId>io.soabase.record-builder</groupId>
              <artifactId>record-builder-processor</artifactId>
              <version>${record-builder-core.version}</version>
            </annotationProcessorPath>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <dataFile>${project.build.directory}/jacoco/jacoco-combined.exec</dataFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <configLocation>checkstyle/production-checkstyle.xml</configLocation>
          <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <id>java-source-additional-tasks</id>
      <activation>
        <file>
          <exists>${basedir}/src/main/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doclint>none</doclint>
              <source>${java.version}</source>
              <release>${java.version}</release>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>java-tests-additional-tasks</id>
      <activation>
        <file>
          <exists>${basedir}/src/test/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <id>jar-tests-classes</id>
                <phase>package</phase>
                <goals>
                  <goal>test-jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-test-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>test-jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>codeQuality</id>
      <activation />
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.surefire</groupId>
                <artifactId>surefire-junit-platform</artifactId>
                <version>${maven.surefire-junit-platform.version}</version>
              </dependency>
            </dependencies>
            <configuration>
              <forkCount>0.5C</forkCount>
              <reuseForks>false</reuseForks>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>analyze</id>
                <goals>
                  <goal>analyze-only</goal>
                </goals>
                <configuration>
                  <failOnWarning>false</failOnWarning>
                  <outputXML>true</outputXML>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <checkModificationExcludes>
                <checkModificationExclude>pom.xml</checkModificationExclude>
              </checkModificationExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <effort>Max</effort>
              <threshold>Medium</threshold>
              <xmlOutput>true</xmlOutput>
              <failOnError>false</failOnError>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-pmd-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <failurePriority>1</failurePriority>
              <failOnViolation>false</failOnViolation>
              <targetJdk>${java.version}</targetJdk>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>pre-unit-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
                  <propertyName>surefireArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>pre-integration-test</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.build.directory}/jacoco/jacoco-it.exec</destFile>
                  <propertyName>failsafeArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>merge-ut-and-it</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>merge</goal>
                </goals>
                <configuration>
                  <fileSets>
                    <fileSet>
                      <directory>${project.build.directory}/jacoco/</directory>
                      <includes>
                        <include>*.exec</include>
                      </includes>
                    </fileSet>
                  </fileSets>
                  <destFile>${project.build.directory}/jacoco/jacoco-combined.exec</destFile>
                </configuration>
              </execution>
              <execution>
                <id>post-integration-test</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <dataFile>${project.build.directory}/jacoco/jacoco-combined.exec</dataFile>
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>**/*Application.*</exclude>
                    <exclude>**/config/*.*</exclude>
                    <exclude>**/aop/*.*</exclude>
                    <exclude>**/*Advice.*</exclude>
                  </excludes>
                  <dataFile>${project.build.directory}/jacoco/jacoco-combined.exec</dataFile>
                  <haltOnFailure>false</haltOnFailure>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>LINE</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>1</minimum>
                        </limit>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>1</minimum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <configLocation>checkstyle/production-checkstyle.xml</configLocation>
                  <encoding>${project.build.sourceEncoding}</encoding>
                  <consoleOutput>true</consoleOutput>
                  <violationSeverity>error</violationSeverity>
                  <failsOnError>false</failsOnError>
                  <failOnViolation>false</failOnViolation>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-java-version</id>
                <phase>validate</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireJavaVersion>
                      <version>${java.version}</version>
                    </requireJavaVersion>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <reportSets>
              <reportSet>
                <id>unit-tests</id>
                <reports>
                  <report>report-only</report>
                </reports>
              </reportSet>
              <reportSet>
                <id>integration-tests</id>
                <reports>
                  <report>failsafe-report-only</report>
                </reports>
              </reportSet>
            </reportSets>
            <configuration>
              <reportsDirectories>
                <trimStackTrace>false</trimStackTrace>
              </reportsDirectories>
            </configuration>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>macos-aarch64</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <properties>
        <platform.classifier>osx</platform.classifier>
      </properties>
    </profile>
    <profile>
      <id>macos-x86_64</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>x86_64</arch>
        </os>
      </activation>
      <properties>
        <platform.classifier>osx</platform.classifier>
      </properties>
    </profile>
    <profile>
      <id>linux-x86_64</id>
      <activation>
        <os>
          <family>unix</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <platform.classifier>linux64</platform.classifier>
      </properties>
    </profile>
    <profile>
      <id>windows-x86_64</id>
      <activation>
        <os>
          <family>windows</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <platform.classifier>win64</platform.classifier>
      </properties>
    </profile>
  </profiles>
</project>