<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.zodac</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.0.13</version>
    <packaging>pom</packaging>
    <name>[${project.artifactId}] Project</name>
    <description>Parent POM containing shared configuration and plugin management for zodac.net projects</description>
    <url>https://github.com/zodac/parent-pom</url>

    <licenses>
        <license>
            <name>BSD Zero Clause License</name>
            <url>https://opensource.org/licenses/0BSD</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>zodac</id>
            <name>zodac</name>
            <email>arouge110@msn.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/zodac/parent-pom.git</connection>
        <developerConnection>scm:git:ssh://github.com/zodac/parent-pom.git</developerConnection>
        <url>https://github.com/zodac/parent-pom</url>
    </scm>

    <properties>
        <!-- Project Properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java-release>26</java-release>
        <maven-release>3.9.16</maven-release>
        <initial-year>2026</initial-year>

        <!-- Build properties -->
        <!-- All enabled by default, de-activated through profiles -->
        <build-helper-phase>none</build-helper-phase>
        <jar-phase>package</jar-phase>
        <skip-artifact-build>false</skip-artifact-build>

        <!-- Lint Properties -->
        <!-- All disabled by default, activated through profiles -->
        <skip-linters>true</skip-linters>
        <skip-sonarqube>true</skip-sonarqube>

        <!-- Test Properties -->
        <!-- All disabled by default, activated through profiles -->
        <skip-integration-tests>true</skip-integration-tests>
        <skip-performance-tests>true</skip-performance-tests>
        <skip-tests>true</skip-tests>
        <skip-ui-tests>true</skip-ui-tests>
        <!-- Adding so Maven plugins will not copy/compile test resources -->
        <maven.test.skip>${skip-tests}</maven.test.skip>
        <!-- JaCoCo Configuration (overridden in each child module) -->
        <line-coverage>0.0</line-coverage>
        <branch-coverage>0.0</branch-coverage>

        <!-- Publish Properties -->
        <skip-gpg-signing>true</skip-gpg-signing>

        <!-- 3PP Versions -->
        <ashot.version>1.5.4</ashot.version>
        <clique.version>4.0.2</clique.version>
        <commons-csv.version>1.14.1</commons-csv.version>
        <flatlaf.version>3.7.1</flatlaf.version>
        <gson.version>2.14.0</gson.version>
        <jbcrypt.version>0.4</jbcrypt.version>
        <jspecify.version>1.0.0</jspecify.version>
        <log4j.version>2.26.0</log4j.version>
        <lombok.version>1.18.46</lombok.version>
        <osgi-annotation.version>8.1.0</osgi-annotation.version>
        <selenium.version>4.44.0</selenium.version>
        <quarkus.version>3.36.2</quarkus.version>

        <!-- Test 3PP Versions -->
        <assertj-core.version>3.27.7</assertj-core.version>
        <junit-bom.version>6.1.0</junit-bom.version>
        <mockito.version>5.23.0</mockito.version>

        <!-- Plugin Versions -->
        <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
        <exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
        <jmeter-maven-plugin.version>3.8.0</jmeter-maven-plugin.version>
        <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <maven-dependency-plugin.version>3.11.0</maven-dependency-plugin.version>
        <maven-enforcer-plugin.version>3.6.3</maven-enforcer-plugin.version>
        <maven-failsafe-plugin.version>3.5.6</maven-failsafe-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
        <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
        <maven-project-info-reports-plugin.version>3.9.0</maven-project-info-reports-plugin.version>
        <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
        <maven-site-plugin.version>3.22.0</maven-site-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
        <versions-maven-plugin.version>2.21.0</versions-maven-plugin.version>

        <!-- Linter 3PP Versions -->
        <checkstyle.version>13.6.0</checkstyle.version>
        <error_prone_core.version>2.50.0</error_prone_core.version>
        <jspecify.version>1.0.0</jspecify.version>
        <licenses.version>1</licenses.version>
        <nullaway.version>0.13.6</nullaway.version>
        <pitest-junit5-plugin.version>1.2.3</pitest-junit5-plugin.version>
        <pmd.version>7.25.0</pmd.version>
        <spotbugs.version>4.10.2</spotbugs.version>

        <!-- Linter Plugin Versions -->
        <asm-version>9.10.1</asm-version>
        <dependency-check-maven.version>12.1.6</dependency-check-maven.version>
        <license-maven-plugin.version>5.0.0</license-maven-plugin.version>
        <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
        <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
        <maven-pmd-plugin.version>3.28.0</maven-pmd-plugin.version>
        <pitest-maven.version>1.25.4</pitest-maven.version>
        <sonar-maven-plugin.version>5.7.0.6970</sonar-maven-plugin.version>
        <sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
        <spotbugs-maven-plugin.version>4.10.2.0</spotbugs-maven-plugin.version>

        <!-- Linter Properties -->
        <ci-config-directory>${project.parent.basedir}/code-quality-config/java</ci-config-directory>
        <checkstyle-file>${ci-config-directory}/checkstyle.xml</checkstyle-file>
        <license-file>${project.parent.basedir}/code-quality-config/licenses/bsd0.txt</license-file>
        <license-header-definition-file>${ci-config-directory}/license-header-definition.txt</license-header-definition-file>
        <pitest-test-strength-threshold>100</pitest-test-strength-threshold>
        <pmd-ruleset>${ci-config-directory}/pmd-ruleset.xml</pmd-ruleset>
        <sonar.exclusions>**/gen/**/*,src/test/**/*</sonar.exclusions>
        <sonar.host.url>${env.SONARQUBE_HOST_URL}</sonar.host.url>
        <sonar.java.checkstyle.reportPaths>${project.build.directory}/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
        <sonar.java.pmd.reportPaths>${project.build.directory}/pmd.xml</sonar.java.pmd.reportPaths>
        <sonar.java.spotbugs.reportPaths>${project.build.directory}/spotbugsXml.xml</sonar.java.spotbugs.reportPaths>
        <sonar.language>java</sonar.language>
        <sonar.projectKey>${project.artifactId}</sonar.projectKey>
        <sonar.projectName>${project.artifactId}</sonar.projectName>
        <sonar.token>${env.SONARQUBE_PAT}</sonar.token>
        <spotbugs-exclude-file>${ci-config-directory}/spotbugs-exclude-filter-file.xml</spotbugs-exclude-file>
        <spotbugs-include-file>${ci-config-directory}/spotbugs-include-filter-file.xml</spotbugs-include-file>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.quarkus.platform</groupId>
                <artifactId>quarkus-bom</artifactId>
                <version>${quarkus.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-bom</artifactId>
                <version>${selenium.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>ru.yandex.qatools.ashot</groupId>
                <artifactId>ashot</artifactId>
                <version>${ashot.version}</version>
                <exclusions>
                    <!-- Not needed -->
                    <exclusion>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
                    </exclusion>
                    <!-- Excluded due to CVEs -->
                    <exclusion>
                        <groupId>com.google.code.gson</groupId>
                        <artifactId>gson</artifactId>
                    </exclusion>
                    <!-- Only used by ashot for test-time image diff utilities, not the screenshot path used here -->
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                    <!-- Already imported -->
                    <exclusion>
                        <groupId>org.seleniumhq.selenium</groupId>
                        <artifactId>selenium-remote-driver</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.github.kusoroadeolu</groupId>
                <artifactId>clique-core</artifactId>
                <version>${clique.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>${commons-csv.version}</version>
            </dependency>
            <dependency>
                <groupId>com.formdev</groupId>
                <artifactId>flatlaf</artifactId>
                <version>${flatlaf.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mindrot</groupId>
                <artifactId>jbcrypt</artifactId>
                <version>${jbcrypt.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jspecify</groupId>
                <artifactId>jspecify</artifactId>
                <version>${jspecify.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_core</artifactId>
                <version>${error_prone_core.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- Provides @NonNull/@Nullable compile-time checks for NullAway -->
            <dependency>
                <groupId>com.uber.nullaway</groupId>
                <artifactId>nullaway</artifactId>
                <version>${nullaway.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <!-- We only want the annotations, we won't be using guava -->
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Provides org.osgi.annotation.versioning.Version, referenced by log4j-api/log4j-core .class files; only needed at compile time -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>osgi.annotation</artifactId>
                <version>${osgi-annotation.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Plugin run at first phase to define properties for use in later phases -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>timestamp-property</id>
                            <goals>
                                <goal>timestamp-property</goal>
                            </goals>
                            <configuration>
                                <name>current-year</name>
                                <!-- Property config -->
                                <locale>en_GB</locale>
                                <pattern>yyyy</pattern>
                                <timeZone>UTC</timeZone>
                                <unit>year</unit>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central-publishing-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <autoPublish>true</autoPublish>
                        <checksums>all</checksums>
                        <deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
                        <publishingServerId>central</publishingServerId>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>

                <!-- Must be run with tests, cannot be run alone -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                    <configuration>
                        <rules>
                            <rule>
                                <element>BUNDLE</element>
                                <limits>
                                    <limit>
                                        <counter>LINE</counter>
                                        <value>COVEREDRATIO</value>
                                        <minimum>${line-coverage}</minimum>
                                    </limit>
                                    <limit>
                                        <counter>BRANCH</counter>
                                        <value>COVEREDRATIO</value>
                                        <minimum>${branch-coverage}</minimum>
                                    </limit>
                                </limits>
                            </rule>
                        </rules>
                        <skip>${skip-tests}</skip>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-check</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>${jmeter-maven-plugin.version}</version>
                    <!-- Configuration defining test files handled by module -->
                    <executions>
                        <!-- Generate JMeter configuration -->
                        <execution>
                            <id>configuration</id>
                            <goals>
                                <goal>configure</goal>
                            </goals>
                        </execution>

                        <!-- Fail build on errors in test -->
                        <execution>
                            <id>jmeter-check-results</id>
                            <goals>
                                <goal>results</goal>
                            </goals>
                        </execution>

                        <!-- Run JMeter tests -->
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- To fix missing/invalid licences, run the following in each module: mvn license:format -Dlint -Dyear="2024" -->
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license-maven-plugin.version}</version>
                    <configuration>
                        <licenseSets>
                            <licenseSet>
                                <excludes>
                                    <exclude>**/gen/**</exclude>
                                </excludes>
                                <header>${license-file}</header>
                                <headerDefinitions>
                                    <headerDefinition>${license-header-definition-file}</headerDefinition>
                                </headerDefinitions>
                                <includes>
                                    <include>src/main/java/**</include>
                                    <include>src/test/java/**</include>
                                </includes>
                            </licenseSet>
                        </licenseSets>
                        <mapping>
                            <java>JavaPackage</java>
                        </mapping>
                        <properties>
                            <initial-year>${initial-year}</initial-year>
                            <!--suppress UnresolvedMavenProperty, defined by build-helper-maven-plugin -->
                            <year>${current-year}</year>
                            <website>zodac.net</website>
                        </properties>
                        <skip>${skip-linters}</skip>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.mycila</groupId>
                            <artifactId>licenses</artifactId>
                            <version>${licenses.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>process-sources</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                    <configuration>
                        <configLocation>${checkstyle-file}</configLocation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <propertyExpansion>checkstyle.config.path=${ci-config-directory}</propertyExpansion>
                        <skip>${skip-linters}</skip>
                        <violationSeverity>info</violationSeverity>
                    </configuration>
                    <!-- Overwrite the default version of Checkstyle -->
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </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>
                    <inherited>true</inherited>
                    <configuration>
                        <release>${java-release}</release>
                        <showWarnings>false</showWarnings>
                        <annotationProcessorPaths>
                            <!-- Configuration for errorprone compiler checks -->
                            <path>
                                <groupId>com.google.errorprone</groupId>
                                <artifactId>error_prone_core</artifactId>
                                <version>${error_prone_core.version}</version>
                            </path>
                            <!-- Configuration for NullAway compiler checks -->
                            <path>
                                <groupId>com.uber.nullaway</groupId>
                                <artifactId>nullaway</artifactId>
                                <version>${nullaway.version}</version>
                            </path>

                            <!-- The errorprone checks will fail unless Lombok is also added -->
                            <path>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok.version}</version>
                            </path>
                        </annotationProcessorPaths>
                        <compilerArgs>
                            <arg>-Xlint:all</arg>
                            <arg>-Xdoclint:all</arg>
                            <!-- Configuration for ErrorProne -->
                            <arg>-XDcompilePolicy=simple</arg>
                            <arg>--should-stop=ifError=FLOW</arg>
                            <arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=${project.groupId}</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
                            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                            <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
                            <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
                            <!-- Configuration for Spring Boot -->
                            <arg>-parameters</arg>
                        </compilerArgs>
                        <fork>true</fork>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                    <dependencies>
                        <!-- Forces support for latest Java bytecode -->
                        <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>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>analyze-only</goal>
                            </goals>
                            <!-- Needs to execute after the 'compile' phase, but before 'test-compile', or else test dependencies cause failures -->
                            <phase>process-classes</phase>
                            <configuration>
                                <failOnWarning>true</failOnWarning>
                                <!-- We're only interested in 'compile' scope dependencies when performing analysis -->
                                <ignoreNonCompile>true</ignoreNonCompile>
                                <ignoredUsedUndeclaredDependencies>
                                    <!-- Included with nullaway, which is scoped 'provided' but appears as a false-positive -->
                                    <ignoredUsedUndeclaredDependency>org.checkerframework:dataflow-nullaway::</ignoredUsedUndeclaredDependency>
                                </ignoredUsedUndeclaredDependencies>
                                <skip>${skip-linters}</skip>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                    <configuration>
                        <rules>
                            <banDynamicVersions>
                                <excludedScopes/>
                                <ignores>
                                    <!-- Format: <ignore>groupId[:artifactId[:version[:type[:scope:[classifier]]]]]</ignore> -->
                                    <!-- Exclude our own JARs -->
                                    <ignore>net.zodac:*:*:jar:*</ignore>
                                </ignores>
                            </banDynamicVersions>
                            <bannedDependencies>
                                <excludes>
                                    <!-- Ban JUnit4, to not conflict with JUnit5 -->
                                    <exclude>junit:junit</exclude>
                                    <exclude>junit:junit-dep</exclude>
                                </excludes>
                            </bannedDependencies>
                            <dependencyConvergence/>
                            <requireJavaVersion>
                                <version>[${java-release},)</version>
                            </requireJavaVersion>
                            <requireMavenVersion>
                                <version>[${maven-release},4.0)</version>
                            </requireMavenVersion>
                        </rules>
                        <skip>${skip-linters}</skip>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-failsafe-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <configuration>
                        <keyname>${env.GPG_KEY_ID}</keyname>
                        <passphrase/>
                        <skip>${skip-gpg-signing}</skip>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </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>
                    <configuration>
                        <!-- Excluding 'missing' due to 'use of default constructor, which does not provide a comment' false positive -->
                        <doclint>all,-missing</doclint>
                        <excludePackageNames/>
                        <!-- Would prefer this to be true, but annoying false positive with default constructors -->
                        <failOnWarnings>false</failOnWarnings>
                        <quiet>true</quiet>
                        <serialwarn>true</serialwarn>
                        <skip>${skip-linters}</skip>
                        <validateLinks>true</validateLinks>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>javadoc</goal>
                            </goals>
                            <phase>install</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven-pmd-plugin.version}</version>
                    <configuration>
                        <excludes>
                            <!-- Generated classes -->
                            <exclude>**/gen/*.java</exclude>
                            <exclude>**/gen/**/*.java</exclude>
                        </excludes>
                        <failOnViolation>true</failOnViolation>
                        <includeTests>true</includeTests>
                        <linkXRef>false</linkXRef>
                        <printFailingErrors>true</printFailingErrors>
                        <rulesets>
                            <ruleset>${pmd-ruleset}</ruleset>
                        </rulesets>
                        <skip>${skip-linters}</skip>
                        <targetJdk>${java-release}</targetJdk>
                    </configuration>
                    <!-- Overwrite the default version of PMD -->
                    <dependencies>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-core</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-java</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-javascript</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>net.sourceforge.pmd</groupId>
                            <artifactId>pmd-jsp</artifactId>
                            <version>${pmd.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>install</phase>
                        </execution>
                    </executions>
                </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-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <configuration>
                        <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <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-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
                        <skipTests>${skip-tests}</skipTests>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>${pitest-maven.version}</version>
                    <configuration>
                        <excludedTestClasses/>
                        <failWhenNoMutations>false</failWhenNoMutations>
                        <outputFormats>html</outputFormats>
                        <skip>${skip-linters}</skip>
                        <testStrengthThreshold>${pitest-test-strength-threshold}</testStrengthThreshold>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.pitest</groupId>
                            <artifactId>pitest-junit5-plugin</artifactId>
                            <version>${pitest-junit5-plugin.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>mutationCoverage</goal>
                            </goals>
                            <phase>install</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>io.quarkus.platform</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build</goal>
                                <goal>generate-code</goal>
                                <goal>generate-code-tests</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar-maven-plugin.version}</version>
                    <configuration>
                        <sonar.skip>${skip-sonarqube}</sonar.skip>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>sonar</goal>
                            </goals>
                            <phase>install</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>${sortpom-maven-plugin.version}</version>
                    <configuration>
                        <createBackupFile>false</createBackupFile>
                        <expandEmptyElements>false</expandEmptyElements>
                        <indentAttribute>schemaLocation</indentAttribute>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <skip>${skip-linters}</skip>
                        <sortDependencies>scope,artifactId</sortDependencies>
                        <sortDependencyManagement>scope,artifactId</sortDependencyManagement>
                        <sortExecutions>true</sortExecutions>
                        <sortModules>true</sortModules>
                        <sortPlugins>artifactId</sortPlugins>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs-maven-plugin.version}</version>
                    <configuration>
                        <effort>max</effort>
                        <includeFilterFile>${spotbugs-include-file}</includeFilterFile>
                        <excludeFilterFile>${spotbugs-exclude-file}</excludeFilterFile>
                        <skip>${skip-linters}</skip>
                    </configuration>
                    <dependencies>
                        <!-- Overwrite the default version of Spotbugs -->
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>${spotbugs.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>install</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                    <configuration>
                        <!-- List of dependencies to not be updated, due to incompatible versions -->
                        <!-- If a valid update becomes available, it can be updated and removed from below -->
                        <excludes/>
                        <generateBackupPoms>false</generateBackupPoms>
                        <ruleSet>
                            <ignoreVersions>
                                <!-- Exclude alpha, beta, milestone, release candidate and SNAPSHOT releases -->
                                <ignoreVersion>
                                    <type>regex</type>
                                    <version>.*(-alpha|-beta|-M\d|CR\d*|-RC\d*|-SNAPSHOT).*</version>
                                </ignoreVersion>
                            </ignoreVersions>
                        </ruleSet>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Run to create properties for other plugins -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Profile to run both tests and linters -->
        <profile>
            <id>activate_all</id>
            <activation>
                <property>
                    <name>all</name>
                </property>
            </activation>
            <properties>
                <skip-performance-tests>false</skip-performance-tests>
                <skip-integration-tests>false</skip-integration-tests>
                <skip-linters>false</skip-linters>
                <skip-tests>false</skip-tests>
                <skip-ui-tests>false</skip-ui-tests>
            </properties>
        </profile>

        <!-- Profile used to execute each module's linters (if any) -->
        <profile>
            <id>activate_linters</id>
            <activation>
                <property>
                    <name>lint</name>
                </property>
            </activation>
            <properties>
                <!-- Needed to build test resources for mutation testing -->
                <maven.test.skip>false</maven.test.skip>
                <skip-linters>false</skip-linters>
            </properties>
        </profile>

        <!-- Profile used to execute each module's testsuite (if any) -->
        <profile>
            <id>activate_tests</id>
            <activation>
                <property>
                    <name>tests</name>
                </property>
            </activation>
            <properties>
                <skip-performance-tests>false</skip-performance-tests>
                <skip-integration-tests>false</skip-integration-tests>
                <skip-tests>false</skip-tests>
                <skip-ui-tests>false</skip-ui-tests>
            </properties>
        </profile>

        <!-- Profile used to publish the artifact to Maven Central -->
        <profile>
            <id>maven_publish</id>
            <activation>
                <property>
                    <name>publish</name>
                </property>
            </activation>
            <properties>
                <skip-gpg-signing>false</skip-gpg-signing>
            </properties>
        </profile>

        <!-- Profile used to execute SonarQube analysis on the project -->
        <!-- Using a separate profile to linters since we only want GitHub to execute this analysis on push -->
        <profile>
            <id>activate_sonarqube</id>
            <activation>
                <property>
                    <name>sonarqube</name>
                </property>
            </activation>
            <properties>
                <skip-sonarqube>false</skip-sonarqube>
            </properties>
        </profile>
    </profiles>
</project>
