<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2024 Craig Motlin
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>

    <parent>
        <groupId>io.liftwizard</groupId>
        <artifactId>liftwizard-minimal-parent</artifactId>
        <version>2.1.32</version>
        <relativePath>../liftwizard-minimal-parent</relativePath>
    </parent>

    <artifactId>liftwizard-profile-parent</artifactId>
    <packaging>pom</packaging>
    <name>Liftwizard Maven Parent (profiles)</name>

    <description>Liftwizard profiles parent is a published parent pom with profiles that are off by default that enable several linters and validators.</description>

    <properties>
        <spotless.check.skip>true</spotless.check.skip>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.eclipse.collections</groupId>
                <artifactId>eclipse-collections-api</artifactId>
                <version>11.1.0</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.collections</groupId>
                <artifactId>eclipse-collections</artifactId>
                <version>11.1.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <suppressionsLocation>${maven.multiModuleProjectDirectory}/checkstyle-suppressions.xml</suppressionsLocation>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>10.21.4</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.44.3</version>
                <configuration>
                    <upToDateChecking>
                        <enabled>true</enabled>
                    </upToDateChecking>
                </configuration>
            </plugin>

            <!--region Phase 21: verify-->
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <configuration>
                    <rules combine.children="append">
                        <requireProfileIdsExist />
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>enforce-requireProfileIdsExist</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <!--endregion Phase 21: verify-->
        </plugins>
    </build>

    <profiles>

        <!--region No phase-->
        <profile>
            <!--Rules that are meant to always pass. They can run in CI with dryRun, or one-off for rewrites.-->
            <id>rewrite-maven-plugin</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.openrewrite.maven</groupId>
                            <artifactId>rewrite-maven-plugin</artifactId>
                            <configuration>
                                <activeRecipes>
                                    <!-- Based on https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/resources/META-INF/rewrite/static-analysis.yml-->
                                    <!-- But these recipes are disabled in Liftwizard:-->
                                    <!-- - org.openrewrite.staticanalysis.EqualsAvoidsNull-->
                                    <!-- As well as all formatting recipes, since we can rely on auto-formatters instead.-->
                                    <recipe>io.liftwizard.staticanalysis.CodeCleanup</recipe>

                                    <!-- Based on https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/resources/META-INF/rewrite/common-static-analysis.yml-->
                                    <!-- But these recipes are disabled in Liftwizard:-->
                                    <!-- - org.openrewrite.staticanalysis.EqualsAvoidsNull-->
                                    <!-- - org.openrewrite.staticanalysis.InlineVariable-->
                                    <!-- - org.openrewrite.staticanalysis.StringLiteralEquality-->
                                    <recipe>io.liftwizard.staticanalysis.CommonStaticAnalysis</recipe>

                                    <recipe>org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass</recipe>
                                    <recipe>org.openrewrite.java.logging.slf4j.Slf4jLogShouldBeConstant</recipe>

                                    <recipe>org.openrewrite.apache.commons.codec.ApacheBase64ToJavaBase64</recipe>
                                    <recipe>org.openrewrite.apache.commons.io.ApacheCommonsFileUtilsRecipes</recipe>
                                    <recipe>org.openrewrite.apache.commons.lang.ApacheCommonsStringUtilsRecipes</recipe>

                                    <recipe>io.liftwizard.rewrite.eclipse.collections.EclipseCollectionsBestPractices</recipe>
                                </activeRecipes>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>io.liftwizard</groupId>
                                    <artifactId>liftwizard-rewrite</artifactId>
                                    <version>2.1.32</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <!--Rules that don't reliably pass. They can't run in CI with dryRun, only one-off for rewrites.-->
            <id>rewrite-maven-plugin-one-off</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.openrewrite.maven</groupId>
                            <artifactId>rewrite-maven-plugin</artifactId>
                            <configuration>
                                <activeRecipes>
                                    <recipe>org.openrewrite.java.testing.junit5.JUnit5BestPractices</recipe>
                                    <recipe>org.openrewrite.java.testing.assertj.Assertj</recipe>

                                    <recipe>io.liftwizard.java.migrate.UpgradeToJava17</recipe>
                                </activeRecipes>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>io.liftwizard</groupId>
                                    <artifactId>liftwizard-rewrite</artifactId>
                                    <version>2.1.32</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>rewrite-maven-plugin-dryRun</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.openrewrite.maven</groupId>
                            <artifactId>rewrite-maven-plugin</artifactId>
                            <configuration>
                                <failOnDryRunResults>true</failOnDryRunResults>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>OpenRewrite dry run</id>
                                    <goals>
                                        <goal>dryRunNoFork</goal>
                                    </goals>
                                    <phase>verify</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!--endregion No phase-->

        <!--region Phase 1: validate-->
        <profile>
            <id>prettier-check</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.hubspot.maven.plugins</groupId>
                        <artifactId>prettier-maven-plugin</artifactId>
                        <version>0.22</version>
                        <configuration>
                            <prettierJavaVersion>2.6.0</prettierJavaVersion>
                            <printWidth>120</printWidth>
                            <tabWidth>4</tabWidth>
                            <nodePath>node</nodePath>
                            <npmPath>npm</npmPath>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>prettier-apply</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.hubspot.maven.plugins</groupId>
                        <artifactId>prettier-maven-plugin</artifactId>
                        <version>0.22</version>
                        <configuration>
                            <prettierJavaVersion>2.6.0</prettierJavaVersion>
                            <printWidth>120</printWidth>
                            <tabWidth>4</tabWidth>
                            <nodePath>node</nodePath>
                            <npmPath>npm</npmPath>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>write</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-check</id>

            <properties>
                <spotless.check.skip>false</spotless.check.skip>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-apply</id>

            <properties>
                <spotless.check.skip>false</spotless.check.skip>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>apply</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-java</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <formats>
                                <format>
                                    <toggleOffOn />
                                    <includes>
                                        <include>**/*.java</include>
                                    </includes>
                                    <trimTrailingWhitespace />
                                    <endWithNewline />
                                </format>
                            </formats>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-formats</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <formats>
                                <format>
                                    <toggleOffOn />
                                    <includes>
                                        <include>.gitattributes</include>
                                        <include>.gitignore</include>
                                    </includes>
                                    <trimTrailingWhitespace />
                                    <endWithNewline />
                                    <indent>
                                        <tabs>true</tabs>
                                        <spacesPerTab>4</spacesPerTab>
                                    </indent>
                                </format>
                            </formats>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-java-sort-imports</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <importOrder>
                                    <!-- use an empty string for all the imports not specified explicitly, '|' to join group without blank line, and '\#` prefix for static imports. -->
                                    <order>java,javax,,\#java|\#javax,\#</order>
                                </importOrder>

                                <removeUnusedImports />
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-java-unused-imports</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <removeUnusedImports />
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-prettier-java</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <prettier>
                                    <devDependencies>
                                        <prettier>3.3.2</prettier>
                                        <prettier-plugin-java>2.6.0</prettier-plugin-java>
                                    </devDependencies>
                                    <config>
                                        <tabWidth>4</tabWidth>
                                        <printWidth>120</printWidth>
                                        <parser>java</parser>
                                        <plugins>prettier-plugin-java</plugins>
                                    </config>
                                </prettier>
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-prettier-java-sort-imports</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <prettier>
                                    <devDependencies>
                                        <prettier>3.3.2</prettier>
                                        <prettier-plugin-java>2.6.0</prettier-plugin-java>
                                    </devDependencies>
                                    <config>
                                        <tabWidth>4</tabWidth>
                                        <printWidth>120</printWidth>
                                        <parser>java</parser>
                                        <plugins>prettier-plugin-java</plugins>
                                    </config>
                                </prettier>

                                <importOrder>
                                    <!-- use an empty string for all the imports not specified explicitly, '|' to join group without blank line, and '\#` prefix for static imports. -->
                                    <order>java,javax,,\#java|\#javax,\#</order>
                                </importOrder>

                                <removeUnusedImports />
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-google-java-format</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <googleJavaFormat>
                                    <version>1.22.0</version>
                                    <style>AOSP</style>
                                    <reflowLongStrings>false</reflowLongStrings>
                                    <reorderImports>true</reorderImports>
                                </googleJavaFormat>
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-java-cleanthat</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <java>
                                <toggleOffOn>
                                    <off>@formatter:off</off>
                                    <on>@formatter:on</on>
                                </toggleOffOn>

                                <!-- Cleanthat will refactor code, but it may break style: apply it before formatter -->
                                <cleanthat />
                            </java>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-antlr</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <antlr4>
                                <toggleOffOn />

                                <antlr4Formatter />
                            </antlr4>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-sql</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <sql>
                                <toggleOffOn />

                                <includes>
                                    <include>**/*.sql</include>
                                </includes>

                                <excludes>
                                    <exclude>**/target/**/*.sql</exclude>
                                </excludes>

                                <prettier>
                                    <devDependencies>
                                        <prettier-plugin-sql>0.18.1</prettier-plugin-sql>
                                    </devDependencies>
                                    <config>
                                        <plugins>prettier-plugin-sql</plugins>
                                    </config>
                                </prettier>
                            </sql>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-pom</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <pom>
                                <toggleOffOn />

                                <sortPom>
                                    <expandEmptyElements>false</expandEmptyElements>
                                    <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                                    <keepBlankLines>true</keepBlankLines>
                                    <nrOfIndentSpace>4</nrOfIndentSpace>

                                    <!-- Sort order of elements: https://github.com/Ekryd/sortpom/wiki/PredefinedSortOrderProfiles-->
                                    <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>

                                    <!-- Custom sort order of elements: https://raw.githubusercontent.com/Ekryd/sortpom/master/sorter/src/main/resources/custom_1.xml -->
                                    <sortOrderFile />
                                </sortPom>
                            </pom>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-markdown</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <markdown>
                                <toggleOffOn />

                                <includes>
                                    <include>**/*.md</include>
                                </includes>

                                <excludes>
                                    <exclude>**/target/**/*.md</exclude>
                                    <exclude>**/src/main/resources/archetype-resources/**/*.md</exclude>
                                </excludes>

                                <flexmark />
                            </markdown>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-json</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <json>
                                <toggleOffOn />

                                <includes>
                                    <include>**/*.json</include>
                                    <include>**/*.json5</include>
                                </includes>

                                <excludes>
                                    <exclude>.*/**/*.json</exclude>
                                    <exclude>.*/**/*.json5</exclude>
                                    <exclude>**/target/**/*.json</exclude>
                                    <exclude>**/target/**/*.json5</exclude>
                                    <exclude>**/archetype-resources/**/*.json</exclude>
                                    <exclude>**/archetype-resources/**/*.json5</exclude>
                                </excludes>

                                <prettier>
                                    <config>
                                        <singleQuote>false</singleQuote>
                                    </config>
                                </prettier>
                            </json>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>spotless-yaml</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                        <configuration>
                            <yaml>
                                <toggleOffOn />

                                <includes>
                                    <include>**/*.yaml</include>
                                    <include>**/*.yml</include>
                                </includes>

                                <excludes>
                                    <exclude>**/target/**/*.yaml</exclude>
                                    <exclude>**/target/**/*.yml</exclude>
                                    <exclude>**/src/main/resources/archetype-resources/**/*.yml</exclude>
                                    <exclude>**/src/main/resources/archetype-resources/**/*.yaml</exclude>
                                </excludes>

                                <prettier>
                                    <config>
                                        <singleQuote>false</singleQuote>
                                    </config>
                                </prettier>
                            </yaml>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--endregion Phase 1: validate-->

        <!--region Phase 7: compile-->
        <profile>
            <id>errorprone</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <compilerArgs combine.children="append">
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>--should-stop=ifError=FLOW</arg>
                                <arg>
                                    -Xplugin:ErrorProne \
                                    -XepExcludedPaths:.*/generated-sources/.* \
                                    -Xep:CanIgnoreReturnValueSuggester:OFF \
                                    -Xep:NullableOnContainingClass:OFF \
                                    <!-- Suppressing EqualsGetClass due to https://github.com/google/error-prone/issues/1144 -->
                                    -Xep:EqualsGetClass:OFF \
                                    -Xep:UnusedVariable:WARN
                                </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>
                            </compilerArgs>
                            <annotationProcessorPaths combine.self="override">
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>2.36.0</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>errorprone-strict</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <compilerArgs combine.children="append">
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>--should-stop=ifError=FLOW</arg>
                                <arg>-Xplugin:ErrorProne \
                                    -XepExcludedPaths:.*/generated-sources/.* \
                                    -Xep:BadImport:ERROR \
                                    -Xep:DefaultCharset:ERROR \
                                    -Xep:InvalidInlineTag:ERROR \
                                    -Xep:JavaDurationGetSecondsToToSeconds:ERROR \
                                    -Xep:MissingOverride:ERROR \
                                    -Xep:ObjectToString:ERROR \
                                    -Xep:StringCaseLocaleUsage:ERROR \
                                    -Xep:StringSplitter:ERROR \
                                    -Xep:UnnecessaryLambda:ERROR</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>
                            </compilerArgs>
                            <annotationProcessorPaths combine.self="override">
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>2.36.0</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>errorprone-patch</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <compilerArgs combine.children="append">
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>--should-stop=ifError=FLOW</arg>
                                <arg>-Xplugin:ErrorProne \
                                    -XepExcludedPaths:.*/generated-sources/.* \
                                    -XepPatchChecks:ERROR \
                                    -XepPatchLocation:${project.build.directory}/errorprone \
                                    -Xep:BadImport:ERROR \
                                    -Xep:DefaultCharset:ERROR \
                                    -Xep:InvalidInlineTag:ERROR \
                                    -Xep:JavaDurationGetSecondsToToSeconds:ERROR \
                                    -Xep:MissingOverride:ERROR \
                                    -Xep:ObjectToString:ERROR \
                                    -Xep:StringCaseLocaleUsage:ERROR \
                                    -Xep:StringSplitter:ERROR \
                                    -Xep:UnnecessaryLambda:ERROR</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>
                            </compilerArgs>
                            <annotationProcessorPaths combine.self="override">
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>2.36.0</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--endregion Phase 7: compile-->

        <!--region Phase 15: test-->
        <profile>
            <id>rerecord</id>

            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <environmentVariables>
                                    <LIFTWIZARD_FILE_MATCH_RULE_RERECORD>true</LIFTWIZARD_FILE_MATCH_RULE_RERECORD>
                                </environmentVariables>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!--endregion Phase 15: test-->

        <profile>
            <id>spotless-preserve-cache</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets combine.children="append">
                                <fileset>
                                    <directory>target</directory>
                                    <excludes>
                                        <exclude>spotless-index</exclude>
                                    </excludes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--region Phase 16: prepare-package-->
        <profile>
            <id>znai-maven-plugin</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.testingisdocumenting.znai</groupId>
                        <artifactId>znai-maven-plugin</artifactId>
                        <version>1.73</version>
                        <configuration>
                            <docId>docs</docId>
                            <sourceRoot>${project.basedir}/src/main/znai</sourceRoot>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--endregion Phase 16: prepare-package-->

        <!--region Phase 17: package-->
        <profile>
            <id>maven-shade-plugin</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-shade-plugin</artifactId>
                            <version>3.6.0</version>
                            <configuration>
                                <createDependencyReducedPom>true</createDependencyReducedPom>
                                <transformers>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                        <resource>reference.conf</resource>
                                    </transformer>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>${mainClass}</mainClass>
                                    </transformer>
                                </transformers>
                                <!-- exclude signed Manifests -->
                                <filters>
                                    <filter>
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>module-info.class</exclude>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                            </configuration>
                            <executions>
                                <execution>
                                    <goals>
                                        <goal>shade</goal>
                                    </goals>
                                    <phase>package</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>maven-javadoc-plugin</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.11.2</version>
                        <configuration>
                            <notimestamp>true</notimestamp>
                            <additionalOptions>-Xdoclint:all -Xdoclint:-missing</additionalOptions>
                            <additionalJOptions>
                                <additionalJOption>-Xdoclint:all</additionalJOption>
                                <additionalJOption>-Xdoclint:-missing</additionalJOption>
                            </additionalJOptions>
                        </configuration>
                        <executions>
                            <execution>
                                <id>create javadoc jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--endregion Phase 17: package-->

        <!--region Phase 21: verify-->
        <profile>
            <id>spotbugs-maven-plugin</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <version>4.9.3.0</version>
                        <configuration>
                            <effort>Max</effort>
                            <threshold>High</threshold>
                            <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <maxHeap>2048</maxHeap>
                            <failOnError>true</failOnError>
                            <xmlOutput>true</xmlOutput>
                            <includeTests>false</includeTests>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jacoco-maven-plugin</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.12</version>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <formats>
                                        <format>XML</format>
                                    </formats>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>checkstyle-semantics</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>3.6.0</version>
                        <configuration>
                            <configLocation>checkstyle-configuration-liftwizard-semantics.xml</configLocation>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.liftwizard</groupId>
                                <artifactId>liftwizard-checkstyle</artifactId>
                                <version>2.1.32</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>checkstyle:check semantics</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>checkstyle-semantics-strict</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>3.6.0</version>
                        <configuration>
                            <configLocation>checkstyle-configuration-liftwizard-semantics-strict.xml</configLocation>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.liftwizard</groupId>
                                <artifactId>liftwizard-checkstyle</artifactId>
                                <version>2.1.32</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>checkstyle:check strict semantics</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>checkstyle-formatting</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>3.6.0</version>
                        <configuration>
                            <configLocation>checkstyle-configuration-liftwizard-formatting.xml</configLocation>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.liftwizard</groupId>
                                <artifactId>liftwizard-checkstyle</artifactId>
                                <version>2.1.32</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>checkstyle:check formatting</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>

        <profile>
            <id>checkstyle-formatting-strict</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>3.6.0</version>
                        <configuration>
                            <configLocation>checkstyle-configuration-liftwizard-formatting-strict.xml</configLocation>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.liftwizard</groupId>
                                <artifactId>liftwizard-checkstyle</artifactId>
                                <version>2.1.32</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>checkstyle:check strict formatting</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>

        <profile>
            <id>maven-dependency-plugin</id>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>3.8.1</version>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <!-- Workaround for bug in maven-dependency-plugin tracked in https://issues.apache.org/jira/browse/MDEP-791 -->
                            <!-- Version 3.1.2 was the last version with a working algorithm. Version 3.2.0 and 3.8.1 support Java 17. -->
                            <ignoredNonTestScopedDependencies>
                                <ignoredNonTestScopedDependency>*</ignoredNonTestScopedDependency>
                            </ignoredNonTestScopedDependencies>
                            <ignoredUnusedDeclaredDependencies combine.children="append">
                                <ignoredUnusedDeclaredDependency>ch.qos.logback:logback-classic</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>com.google.auto.service:auto-service-annotations</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>com.google.auto.value:auto-value-annotations</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>com.h2database:h2</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-auth-filter-firebase</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-auth-filter-header</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-auth-filter-impersonation</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-clock-fixed</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-clock-incrementing</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-clock-system</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-logging-buffered</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-logging-filter-janino</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-logging-filter-requesturl</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-logging-logstash-console</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-logging-logstash-file</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-uuid-seed</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-config-uuid-system</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-connection-manager-h2-memory</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-graphql-query-schema</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-graphql-reladomo-meta</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-liquibase-simulated-sequence</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-logging-buffered-appender</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-logging-p6spy</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>io.liftwizard:liftwizard-reladomo-simulated-sequence</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>jakarta.activation:jakarta.activation-api</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>jakarta.annotation:jakarta.annotation-api</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>jakarta.inject:jakarta.inject-api</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>jakarta.xml.bind:jakarta.xml.bind-api</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.glassfish.jaxb:jaxb-runtime</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.eclipse.collections:eclipse-collections</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.slf4j:jcl-over-slf4j</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.slf4j:jul-to-slf4j</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.slf4j:log4j-over-slf4j</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.slf4j:slf4j-reload4j</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>p6spy:p6spy</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>postgresql:postgresql</ignoredUnusedDeclaredDependency>
                            </ignoredUnusedDeclaredDependencies>
                        </configuration>

                        <executions>
                            <execution>
                                <id>dependency:analyze-only</id>
                                <goals>
                                    <goal>analyze-only</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>maven-enforcer-plugin</id>

            <build>
                <plugins>

                    <plugin>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <configuration>
                            <rules combine.children="append">
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>commons-logging-api</exclude>
                                        <exclude>commons-logging</exclude>
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <exclude>commons-logging:commons-logging-api</exclude>
                                    </excludes>
                                    <message>commons-logging is banned. Use SLF4J with the jcl-over-slf4j bridge instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.springframework:spring-jcl</exclude>
                                    </excludes>
                                    <message>spring-jcl is banned. Use SLF4J with the jcl-over-slf4j bridge instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>com.sun.activation:javax.activation</exclude>
                                        <exclude>javax.activation:javax.activation-api</exclude>
                                    </excludes>
                                    <message>javax.activation is banned. Use Jakarta Activation (jakarta.activation:jakarta.activation-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.inject:javax.inject</exclude>
                                    </excludes>
                                    <message>javax.inject is banned. Use Jakarta Inject (jakarta.inject:jakarta.inject-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.servlet:javax.servlet-api</exclude>
                                    </excludes>
                                    <message>javax.servlet-api is banned. Use Jakarta Servlet (jakarta.servlet:jakarta.servlet-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.validation:validation-api</exclude>
                                    </excludes>
                                    <message>validation-api is banned. Use Jakarta Validation (jakarta.validation:jakarta.validation-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.ws.rs:javax.ws.rs-api</exclude>
                                    </excludes>
                                    <message>javax.ws.rs-api is banned. Use Jakarta REST (jakarta.ws.rs:jakarta.ws.rs-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.xml.bind:jaxb-api</exclude>
                                    </excludes>
                                    <message>jaxb-api is banned. Use Jakarta XML Binding (jakarta.xml.bind:jakarta.xml.bind-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.xml.ws:jaxws-api</exclude>
                                    </excludes>
                                    <message>jaxws-api is banned. Use Jakarta XML Web Services (jakarta.xml.ws:jakarta.xml.ws-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>javax.annotation:javax.annotation-api</exclude>
                                    </excludes>
                                    <message>javax.annotation:javax.annotation-api is banned. Use Jakarta Annotations (jakarta.annotation:jakarta.annotation-api) instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>log4j:log4j</exclude>
                                        <exclude>org.apache.logging.log4j:log4j</exclude>
                                    </excludes>
                                    <message>log4j 1.x is banned. Use SLF4J with the log4j-over-slf4j bridge instead.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.slf4j:jcl</exclude>
                                        <exclude>org.slf4j:nop</exclude>
                                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <exclude>org.slf4j:slf4j-simple</exclude>
                                    </excludes>
                                    <message>Conflicting SLF4J bindings are banned. Use Logback (ch.qos.logback:logback-classic) as the SLF4J implementation.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>com.google.auto.value:auto-value</exclude>
                                    </excludes>
                                    <message>Move auto-value to maven-compiler-plugin's annotationProcessorPaths. The compile time dependency is com.google.auto.value:auto-value-annotations</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>com.google.auto.service:auto-service</exclude>
                                    </excludes>
                                    <message>Move auto-service to maven-compiler-plugin's annotationProcessorPaths. The compile time dependency is com.google.auto.service:auto-service-annotations</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.junit.jupiter:junit-jupiter-engine</exclude>
                                        <exclude>org.junit.platform:junit-platform-engine</exclude>
                                    </excludes>
                                    <!--searchTransitive is set to false because dropwizard-testing violates this rule, through jersey-test-framework-core-->
                                    <searchTransitive>false</searchTransitive>
                                    <message>To use JUnit 5, depend on org.junit.jupiter:junit-jupiter-api. If you need a particular engine, move the dependency into the dependencies section of maven-surefire-plugin.</message>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.junit.vintage:junit-vintage-engine</exclude>
                                    </excludes>
                                    <searchTransitive>false</searchTransitive>
                                    <message>To use JUnit 4, depend on junit:junit. If you need a particular engine, move the dependency into the dependencies section of maven-surefire-plugin.</message>
                                </bannedDependencies>
                                <banDuplicatePomDependencyVersions />
                                <banDuplicateClasses>
                                    <findAllDuplicates>true</findAllDuplicates>
                                    <ignoreWhenIdentical>true</ignoreWhenIdentical>
                                    <ignoreClasses>
                                        <ignoreClass>org.aopalliance.aop.*</ignoreClass>
                                        <ignoreClass>org.aopalliance.intercept.*</ignoreClass>
                                    </ignoreClasses>
                                </banDuplicateClasses>
                            </rules>
                        </configuration>
                        <executions>
                            <execution>
                                <id>enforce</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
        <!--endregion Phase 21: verify-->

        <profile>
            <id>deploy</id>

            <build>
                <plugins>
                    <!--region Phase 17: package-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>create source jar</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--endregion Phase 17: package-->
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
