<?xml version="1.0" encoding="UTF-8"?>
<!--

    MIT License

    Copyright (c) 2010-2023 The Waffle Project Contributors: https://github.com/Waffle/waffle/graphs/contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

-->
<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.github.waffle</groupId>
    <artifactId>waffle-parent</artifactId>
    <version>3.3.0</version>
    <packaging>pom</packaging>

    <name>waffle-parent</name>
    <description>Parent POM for WAFFLE</description>
    <url>https://waffle.github.io/waffle/</url>
    <inceptionYear>2010</inceptionYear>
    <organization>
        <name>com.github.waffle</name>
        <url>https://github.com/waffle/</url>
    </organization>
    <licenses>
        <license>
            <name>MIT</name>
            <url>https://raw.github.com/Waffle/waffle/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>dblock</id>
            <name>Daniel Doubrovkine</name>
            <email>dblock@dblock.org</email>
            <url>https://github.com/dblock/</url>
            <organization>dblock</organization>
            <organizationUrl>http://code.dblock.org</organizationUrl>
            <roles>
                <role>Architect</role>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
            <properties>
                <picUrl>https://avatars3.githubusercontent.com/u/542335?s=400</picUrl>
            </properties>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Jeremy Landis</name>
            <email>jeremylandis@hotmail.com</email>
            <url>https://www.linkedin.com/in/jeremy-landis-548b2719</url>
            <organization>hazendaz</organization>
            <organizationUrl>https://github.com/hazendaz</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
            <properties>
                <picUrl>https://avatars0.githubusercontent.com/u/975267</picUrl>
            </properties>
        </contributor>
    </contributors>

    <modules>
        <module>waffle-bom</module>
        <module>waffle-demo</module>
        <module>waffle-distro</module>
        <module>waffle-jetty</module>
        <module>waffle-jna</module>
        <module>waffle-jna-jakarta</module>
        <module>waffle-shiro</module>
        <module>waffle-spring-boot2</module>
        <module>waffle-spring-boot3</module>
        <module>waffle-spring-security5</module>
        <module>waffle-spring-security6</module>
        <module>waffle-tests</module>
        <module>waffle-tests-jakarta</module>
        <module>waffle-tomcat85</module>
        <module>waffle-tomcat9</module>
        <module>waffle-tomcat10</module>
    </modules>

    <scm>
        <connection>scm:git:ssh://git@github.com/waffle/waffle.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/waffle/waffle.git</developerConnection>
        <url>https://github.com/Waffle/waffle</url>
        <tag>waffle-parent-3.3.0</tag>
    </scm>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/Waffle/waffle/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Github</system>
        <url>https://github.com/Waffle/waffle/actions</url>
    </ciManagement>
    <distributionManagement>
        <site>
            <id>gh-pages-scm</id>
            <name>Waffle GitHub Pages</name>
            <url>scm:git:ssh://git@github.com/Waffle/waffle.git</url>
        </site>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <!-- Project Level -->
        <copyright>2023</copyright>

        <!-- Remember to adjust this up as you add unit tests -->
        <jacoco.minimum.coverage>0.0</jacoco.minimum.coverage>

        <!-- Maven Settings -->
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>

        <!-- Maven compiler options -->
        <java.version>8</java.version>
        <java.release.version>8</java.release.version>
        <java.test.version>11</java.test.version>
        <java.test.release.version>11</java.test.release.version>

        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.release.version}</maven.compiler.release>
        <maven.compiler.testSource>${java.test.version}</maven.compiler.testSource>
        <maven.compiler.testTarget>${java.test.version}</maven.compiler.testTarget>
        <maven.compiler.testRelease>${java.test.release.version}</maven.compiler.testRelease>

        <maven.min-version>3.8.6</maven.min-version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Automatic Module Name for JPMS -->
        <module.name>waffle.parent</module.name>

        <!-- Checkstyle -->
        <checkstyle.config>checkstyle.xml</checkstyle.config>

        <!-- Third Party Versions -->
        <assertj.version>3.24.2</assertj.version>
        <commons-math.version>3.6.1</commons-math.version>
        <error-prone.version>2.18.0</error-prone.version>
        <j2objc.version>2.8</j2objc.version>
        <jmh.version>1.36</jmh.version>
        <jmockit.version>1.49.4</jmockit.version>
        <jopt-simple.version>5.0.4</jopt-simple.version>
        <junit.version>5.9.2</junit.version>
        <spotbugs.version>4.7.3</spotbugs.version>
        <slf4j.version>2.0.7</slf4j.version>

        <!-- Plugins -->
        <antrun.plugin>3.1.0</antrun.plugin>
        <assembly.plugin>3.5.0</assembly.plugin>
        <build-helper.plugin>3.3.0</build-helper.plugin>
        <changelog.plugin>2.3</changelog.plugin>
        <changes.plugin>2.12.1</changes.plugin>
        <checkstyle.plugin>3.2.1</checkstyle.plugin>
        <clean.plugin>3.2.0</clean.plugin>
        <compiler.plugin>3.11.0</compiler.plugin>
        <coveralls.plugin>4.4.1</coveralls.plugin>
        <dependency.plugin>3.5.0</dependency.plugin>
        <dependency-check.plugin>8.2.1</dependency-check.plugin>
        <deploy.plugin>3.1.1</deploy.plugin>
        <directory.plugin>1.0</directory.plugin>
        <enforcer.plugin>3.2.1</enforcer.plugin>
        <formatter.plugin>2.22.0</formatter.plugin>
        <git-commit-id.plugin>5.0.0</git-commit-id.plugin>
        <gpg.plugin>3.0.1</gpg.plugin>
        <htmlcompressor.plugin>1.8.0</htmlcompressor.plugin>
        <impsort.plugin>1.8.0</impsort.plugin>
        <install.plugin>3.1.1</install.plugin>
        <jacoco.plugin>0.8.8</jacoco.plugin>
        <jar.plugin>3.3.0</jar.plugin>
        <javadoc.plugin>3.5.0</javadoc.plugin>
        <jxr.plugin>3.3.0</jxr.plugin>
        <license.plugin>4.2</license.plugin>
        <modernizer.plugin>2.6.0</modernizer.plugin>
        <nexus-staging.plugin>1.6.13</nexus-staging.plugin>
        <pmd.plugin>3.20.0</pmd.plugin>
        <project-info-reports.plugin>3.4.2</project-info-reports.plugin>
        <release.plugin>3.0.0</release.plugin>
        <resources.plugin>3.3.1</resources.plugin>
        <scm.plugin>2.0.0</scm.plugin>
        <source.plugin>3.2.1</source.plugin>
        <spotbugs.plugin>4.7.3.3</spotbugs.plugin>
        <site.plugin>3.12.1</site.plugin>
        <sonar.plugin>3.9.1.2184</sonar.plugin>
        <sortpom.plugin>3.2.1</sortpom.plugin>
        <surefire.plugin>3.0.0</surefire.plugin>
        <taglist.plugin>3.0.0</taglist.plugin>
        <versions.plugin>2.15.0</versions.plugin>
        <wagon.plugin>2.0.2</wagon.plugin>
        <war.plugin>3.3.2</war.plugin>
        <yuicompressor.plugin>1.5.1</yuicompressor.plugin>

        <!-- Plugin Dependency Versions -->
        <bind-api.version>2.3.3</bind-api.version>
        <bug-pattern.version>1.5.0</bug-pattern.version>
        <build-tools.version>1.3.0</build-tools.version>
        <checkstyle.version>10.9.3</checkstyle.version>
        <doxia.version>1.12.0</doxia.version>
        <extra-enforcer-rules.version>1.6.1</extra-enforcer-rules.version>
        <sb-contrib.version>7.6.0</sb-contrib.version>
        <findsecbugs.version>1.12.0</findsecbugs.version>
        <fluido.version>1.11.2</fluido.version>
        <htmlcompressor.version>1.8.0</htmlcompressor.version>
        <jgit.version>6.5.0.202303070854-r</jgit.version>
        <plexus-utils.version>3.5.1</plexus-utils.version>
        <scm.version>2.0.0</scm.version>
        <wagon.version>3.5.3</wagon.version>
        <yuicompressor.version>2.4.8</yuicompressor.version>

        <!-- Lifecycle Mapping -->
        <lifecycle.version>1.0.0</lifecycle.version>

        <!-- Surefire args for jmockit -->
        <argLine>-javaagent:${settings.localRepository}/com/github/hazendaz/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar -Djdk.attach.allowAttachSelf</argLine>
    </properties>

    <dependencies>
        <dependency><!-- prevent warning: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". -->
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Sonar Needs Following for Scans -->
        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
            <version>${error-prone.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.j2objc</groupId>
            <artifactId>j2objc-annotations</artifactId>
            <version>${j2objc.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <version>${spotbugs.version}</version>
            <scope>provided</scope>
        </dependency>
 
        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.hazendaz.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <version>${jmockit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Performance Testing -->
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>${jmh.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>${jmh.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.jopt-simple</groupId>
            <artifactId>jopt-simple</artifactId>
            <version>${jopt-simple.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Core plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${clean.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.plugin}</version>
                    <configuration>
                        <!-- Error Prone Configuration -->
                        <annotationProcessorPaths>
                            <path>
                                <groupId>com.google.errorprone</groupId>
                                <artifactId>error_prone_core</artifactId>
                                <version>${error-prone.version}</version>
                            </path>
                        </annotationProcessorPaths>

                        <compilerArgs>
                            <arg>-XDcompilePolicy=simple</arg>
                            <arg>-Xplugin:ErrorProne</arg>
                        </compilerArgs>

                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>

                        <!-- Slightly faster builds, see https://issues.apache.org/jira/browse/MCOMPILER-209 -->
                        <useIncrementalCompilation>false</useIncrementalCompilation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${deploy.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${enforcer.plugin}</version>
                    <configuration>
                        <rules>
                            <enforceBytecodeVersion>
                                <maxJdkVersion>${java.version}</maxJdkVersion>
                                <excludes>
                                    <exclude>org.mockito:mockito-core</exclude>
                                    <exclude>com.github.waffle:waffle-tests</exclude>
                                    <exclude>com.github.waffle:waffle-tests-jakarta</exclude>
                                </excludes>
                            </enforceBytecodeVersion>
                            <requireJavaVersion>
                                <version>[17,18),[20,21),[21,22)</version>
                            </requireJavaVersion>
                            <requireMavenVersion>
                                <version>[${maven.min-version},)</version>
                            </requireMavenVersion>
                        </rules>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>extra-enforcer-rules</artifactId>
                            <version>${extra-enforcer-rules.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${gpg.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${install.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${resources.plugin}</version>
                    <configuration>
                        <propertiesEncoding>${project.build.resourceEncoding}</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${site.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>${doxia.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-scm</artifactId>
                            <version>${wagon.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-api</artifactId>
                            <version>${scm.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>${scm.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-manager-plexus</artifactId>
                            <version>${scm.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-utils</artifactId>
                            <version>${plexus-utils.version}</version>
                        </dependency>
                        <!-- For reporting only of versions -->
                        <dependency>
                            <groupId>org.apache.maven.skins</groupId>
                            <artifactId>maven-fluido-skin</artifactId>
                            <version>${fluido.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.plugin}</version>
                    <configuration>
                       <excludes>
                            <exclude>**/*LoadTest.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <!-- Build Plugins -->
                <plugin>
                    <groupId>io.github.git-commit-id</groupId>
                    <artifactId>git-commit-id-maven-plugin</artifactId>
                    <version>${git-commit-id.plugin}</version>
                    <configuration>
                        <failOnNoGitDirectory>false</failOnNoGitDirectory>
                        <!-- Prevent issues, see https://github.com/ktoso/maven-git-commit-id-plugin/issues/61 -->
                        <gitDescribe>
                            <always>true</always>
                        </gitDescribe>
                        <runOnlyOnce>true</runOnlyOnce>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper.plugin}</version>
                </plugin>
                <!-- Packaging types / tools -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${jar.plugin}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Automatic-Module-Name>${module.name}</Automatic-Module-Name>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                                <X-Compile-Release-JDK>${maven.compiler.release}</X-Compile-Release-JDK>
                            </manifestEntries>
                        </archive>
                        <skipIfEmpty>true</skipIfEmpty>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${war.plugin}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Number>${buildNumber}</Build-Number>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                                <X-Compile-Release-JDK>${maven.compiler.release}</X-Compile-Release-JDK>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!-- Reporting plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle.plugin}</version>
                    <configuration>
                        <configLocation>${checkstyle.config}</configLocation>
                        <failOnViolation>false</failOnViolation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${javadoc.plugin}</version>
                    <configuration>
                        <additionalOptions>
                            <option>-html5</option>
                        </additionalOptions>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                                <X-Compile-Release-JDK>${maven.compiler.release}</X-Compile-Release-JDK>
                            </manifestEntries>
                        </archive>
                        <quiet>true</quiet>
                        <failOnError>false</failOnError> <!-- TODO: Research why we are getting a null pointer! -->
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${pmd.plugin}</version>
                    <configuration>
                        <analysisCache>true</analysisCache>
                        <failOnViolation>false</failOnViolation>
                    </configuration>
                </plugin>

                <!-- Tools -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${antrun.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${assembly.plugin}</version>
                    <configuration>
                        <descriptors>
                            <descriptor>${project.basedir}/src/assembly/assembly.xml</descriptor>
                        </descriptors>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${release.plugin}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <releaseProfiles>release</releaseProfiles>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${source.plugin}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                                <X-Compile-Release-JDK>${maven.compiler.release}</X-Compile-Release-JDK>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <!-- External Tools -->
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs.plugin}</version>
                    <configuration>
                        <effort>max</effort>
                        <includeTests>true</includeTests>
                        <failOnError>false</failOnError>
                        <plugins>
                            <plugin>
                                <groupId>com.mebigfatguy.sb-contrib</groupId>
                                <artifactId>sb-contrib</artifactId>
                                <version>${sb-contrib.version}</version>
                            </plugin>
                            <plugin>
                                <groupId>com.h3xstream.findsecbugs</groupId>
                                <artifactId>findsecbugs-plugin</artifactId>
                                <version>${findsecbugs.version}</version>
                            </plugin>
                            <plugin>
                                <groupId>jp.skypencil.findbugs.slf4j</groupId>
                                <artifactId>bug-pattern</artifactId>
                                <version>${bug-pattern.version}</version>
                            </plugin>
                        </plugins>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.hazendaz.maven</groupId>
                    <artifactId>htmlcompressor-maven-plugin</artifactId>
                    <version>${htmlcompressor.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.hazendaz</groupId>
                            <artifactId>htmlcompressor</artifactId>
                            <version>${htmlcompressor.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.yahoo.platform.yui</groupId>
                            <artifactId>yuicompressor</artifactId>
                            <version>${yuicompressor.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>io.jsonwebtoken.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>${coveralls.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>jakarta.xml.bind</groupId>
                            <artifactId>jakarta.xml.bind-api</artifactId>
                            <version>${bind-api.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>${sortpom.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>yuicompressor-maven-plugin</artifactId>
                    <version>${yuicompressor.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.yahoo.platform.yui</groupId>
                            <artifactId>yuicompressor</artifactId>
                            <version>${yuicompressor.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${formatter.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.hazendaz</groupId>
                            <artifactId>build-tools</artifactId>
                            <version>${build-tools.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>${impsort.plugin}</version>
                    <configuration>
                        <groups>com,jakarta,java,javax,mockit,org,waffle</groups>
                        <staticGroups>java,*</staticGroups>
                        <removeUnused>true</removeUnused>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license.plugin}</version>
                    <configuration>
                        <licenseSets>
                            <licenseSet>
                                <header>${main.basedir}/LICENSE_HEADER</header>
                                <excludes>
                                    <exclude>**/spring.factories</exclude>
                                    <exclude>**/spring.provides</exclude>
                                </excludes>
                            </licenseSet>
                        </licenseSets>
                        <mapping>
                            <conf>DOUBLESLASH_STYLE</conf>
                            <policy>DOUBLESLASH_STYLE</policy>
                        </mapping>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.mycila</groupId>
                            <artifactId>license-maven-plugin-git</artifactId>
                            <version>${license.plugin}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!-- Report Only -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changelog-plugin</artifactId>
                    <version>${changelog.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>${changes.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.eclipse.jgit</groupId>
                            <artifactId>org.eclipse.jgit</artifactId>
                            <version>${jgit.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-jgit</artifactId>
                            <version>${scm.plugin}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <githubAPIScheme>https</githubAPIScheme>
                        <githubAPIPort>443</githubAPIPort>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>${jxr.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${project-info-reports.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>taglist-maven-plugin</artifactId>
                    <version>${taglist.plugin}</version>
                    <configuration>
                        <tagListOptions>
                            <tagClasses>
                                <tagClass>
                                    <displayName>FIXME Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>fixme</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>@fixme</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Todo Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>@todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Deprecated Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>@deprecated</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                           </tagClasses>
                        </tagListOptions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions.plugin}</version>
                </plugin>

                <!-- SCM -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>${scm.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.eclipse.jgit</groupId>
                            <artifactId>org.eclipse.jgit</artifactId>
                            <version>${jgit.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-jgit</artifactId>
                            <version>${scm.plugin}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!-- Sonar -->
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar.plugin}</version>
                </plugin>

                <!-- Wagon -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>wagon-maven-plugin</artifactId>
                    <version>${wagon.plugin}</version>
                </plugin>

                <!-- Owasp Dependency Scan -->
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${dependency-check.plugin}</version>
                </plugin>

                <!-- Sonatype Release -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging.plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <!-- Find maven root -->
                <plugin>
                    <groupId>org.commonjava.maven.plugins</groupId>
                    <artifactId>directory-maven-plugin</artifactId>
                    <version>${directory.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.gaul</groupId>
                    <artifactId>modernizer-maven-plugin</artifactId>
                    <version>${modernizer.plugin}</version>
                    <configuration>
                        <javaVersion>${maven.compiler.target}</javaVersion>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Core plugins -->
            <!-- Delete all from target but not target itself -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <excludeDefaultDirectories>true</excludeDefaultDirectories>
                    <filesets>
                        <fileset>
                            <directory>${project.build.directory}</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <!-- Build Plugins -->
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>git-commit-id</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

            <!-- Packaging types / Tools -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-jars</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Reporting Plugins -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Tools -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>enforce-clean</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>enforce-site</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Find maven root -->
            <plugin>
                <groupId>org.commonjava.maven.plugins</groupId>
                <artifactId>directory-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>directories</id>
                        <goals>
                            <goal>highest-basedir</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <property>main.basedir</property>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Checkstyle dependencies required here or they won't be used (per maven) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.gaul</groupId>
                <artifactId>modernizer-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>modernizer</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>modernizer</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changelog-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>github-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>checks</id>
            <build>
                <plugins>
                    <!-- Reporting Plugins -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-pmd-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                    <goal>cpd-check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- External Tools -->
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <limits>
                                                <limit>
                                                    <counter>COMPLEXITY</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco.minimum.coverage}</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>compression</id>
            <activation>
                <file>
                    <exists>compression.xml</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.hazendaz.maven</groupId>
                        <artifactId>htmlcompressor-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-compile</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>html</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <compressCss>true</compressCss>
                            <compressJavaScript>true</compressJavaScript>
                            <javascriptHtmlSprite>false</javascriptHtmlSprite>
                            <yuiJsNoMunge>true</yuiJsNoMunge>
                            <removeIntertagSpaces>true</removeIntertagSpaces>
                            <srcFolder>${project.basedir}/src/main/resources</srcFolder>
                            <targetFolder>${project.basedir}/target/classes</targetFolder>
                            <fileExt>
                                <fileExt>html</fileExt>
                                <fileExt>jsp</fileExt>
                                <fileExt>xhtml</fileExt>
                                <fileExt>xml</fileExt>
                            </fileExt>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>yuicompressor-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-compile</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>compress</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <nomunge>true</nomunge>
                            <nosuffix>true</nosuffix>
                            <excludes>
                                <exclude>**/*.min.js</exclude>
                                <exclude>**/*.min.css</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>coveralls</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                            <version>${jacoco.plugin}</version>
                            <!-- TODO: Due to coveralls having issue with jacoco line on method in this class, skip it from coverage metrics until another solution determined. -->
                            <configuration>
                                <excludes>
                                    <exclude>**/*MixedAuthenticator.class</exclude>
                                    <exclude>**/*NegotiateAuthenticator.class</exclude>
                                    <exclude>**/*WaffleAuthenticatorBase.class</exclude>
                                    <exclude>**/*WindowsRealm.class</exclude>
                                </excludes>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!--This plugin's configuration is used to store Eclipse m2e settings only. It 
                            has no influence on the Maven build itself. -->
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <!-- Keep version here as fake version and maven report info has problems defining it in dependency management -->
                            <version>${lifecycle.version}</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.commonjava.maven.plugins</groupId>
                                                <artifactId>directory-maven-plugin</artifactId>
                                                <versionRange>[${directory.plugin},)</versionRange>
                                                <goals>
                                                    <goal>highest-basedir</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <execute>
                                                    <runOnConfiguration>true</runOnConfiguration>
                                                    <runOnIncremental>true</runOnIncremental>
                                                </execute>
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>com.mycila</groupId>
                                                <artifactId>license-maven-plugin</artifactId>
                                                <versionRange>[${license.plugin},)</versionRange>
                                                <goals>
                                                    <goal>format</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <execute>
                                                    <runOnConfiguration>true</runOnConfiguration>
                                                    <runOnIncremental>true</runOnIncremental>
                                                </execute>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>format</id>
            <activation>
                <file>
                    <exists>format.xml</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                        <configuration>
                            <configFile>eclipse-formatter-config-4space.xml</configFile>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sort</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jdk17on</id>
            <activation>
                <jdk>[17,)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <fork>true</fork>
                                <compilerArgs combine.children="append">
                                    <!-- Error Prone Needs -->
                                    <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>
                                </compilerArgs>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>sort</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.ekryd.sortpom</groupId>
                        <artifactId>sortpom-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sort</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Skip license plugin during release as maven release is now shallow cloned -->
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
