codingstyle-pom
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle-pom</artifactId>
<version>6.11.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle-pom</artifactId>
<version>6.11.0</version>
<packaging>pom</packaging>
<name>Java coding style POM</name>
<description>Each Java project should follow a given coding style. I.e., all contributions to the source code should use the same
formatting rules, design principles, code patterns, idioms, etc. I published such a coding style in my
GitHub project codingstyle (https://github.com/uhafner/codingstyle) — I am using this coding style in my lectures
about software development at Munich University of Applied Sciences and in all of my open source projects.
If you want to use this coding style as well, you can use this Maven POM as the parent of your own POM. Then you
get the configuration several static analysis and testing tools for free.</description>
<url>https://cs.hm.edu/~hafner</url>
<licenses>
<license>
<name>MIT license</name>
<comments>All source code is copyrighted by Ullrich Hafner and licensed under the MIT license.</comments>
</license>
<license>
<name>Creative Commons Attribution 4.0 International License</name>
<comments>All documents are licensed under a Creative Commons Attribution 4.0 International License</comments>
</license>
</licenses>
<developers>
<developer>
<id>uhafner</id>
<name>Ullrich Hafner</name>
<email>ullrich.hafner@hm.edu</email>
<url>https://cs.hm.edu/~hafner</url>
<organization>Munich University of Applied Sciences</organization>
<organizationUrl>https://www.hm.edu/en/index.en.html</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/uhafner/codingstyle-pom.git</connection>
<developerConnection>scm:git:git@github.com:uhafner/codingstyle-pom.git</developerConnection>
<tag>v6.11.0</tag>
<url>https://github.com/uhafner/codingstyle-pom</url>
</scm>
<properties>
<source.encoding>UTF-8</source.encoding>
<project.build.sourceEncoding>${source.encoding}</project.build.sourceEncoding>
<java.version>21</java.version>
<java.build.version>21</java.build.version>
<module.name>undefined</module.name>
<pmd.skip>false</pmd.skip>
<codingstyle.config.version>6.11.0</codingstyle.config.version>
<codingstyle.library.version>${codingstyle.config.version}</codingstyle.library.version>
<!-- Project Dependencies Configuration -->
<spotbugs.version>4.9.8</spotbugs.version>
<commons.lang.version>3.20.0</commons.lang.version>
<commons.io.version>2.22.0</commons.io.version>
<byte-buddy.version>1.18.8-jdk5</byte-buddy.version>
<slf4j.version>2.0.17</slf4j.version>
<streamex.version>0.8.4</streamex.version>
<commons-logging.version>1.3.6</commons-logging.version>
<!-- Project Test Dependencies Configuration -->
<equalsverifier.version>4.5</equalsverifier.version>
<junit.version>6.0.3</junit.version>
<junit-pioneer.version>2.3.0</junit-pioneer.version>
<mockito.version>5.23.0</mockito.version>
<assertj.version>3.27.7</assertj.version>
<archunit.version>1.4.2</archunit.version>
<!-- Maven Plug-ins Configuration -->
<maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
<maven-site-plugin.version>3.20.0</maven-site-plugin.version>
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
<maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
<maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.5.5</maven-failsafe-plugin.version>
<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
<maven-pmd-plugin.version>3.28.0</maven-pmd-plugin.version>
<pmd.version>7.24.0</pmd.version>
<pmd.metrics.version>7.24.0-metrics</pmd.metrics.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<checkstyle.version>13.4.2</checkstyle.version>
<spotbugs-maven-plugin.version>4.9.8.3</spotbugs-maven-plugin.version>
<findsecbugs-plugin.version>1.14.0</findsecbugs-plugin.version>
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
<pitest-maven-plugin.version>1.23.1</pitest-maven-plugin.version>
<pitest-junit5-plugin.version>1.2.3</pitest-junit5-plugin.version>
<pitmute.version>1.1.0</pitmute.version>
<error-prone.version>2.49.0</error-prone.version>
<nullaway.version>0.13.4</nullaway.version>
<revapi-maven-plugin.version>0.15.1</revapi-maven-plugin.version>
<revapi-java.version>0.28.4</revapi-java.version>
<revapi-reporter-json-version>0.5.1</revapi-reporter-json-version>
<central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
<assertj-assertions-generator-maven-plugin.version>2.2.0</assertj-assertions-generator-maven-plugin.version>
<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
<maven-dependency-plugin.version>3.10.0</maven-dependency-plugin.version>
<depgraph-maven-plugin.version>4.0.3</depgraph-maven-plugin.version>
<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
<git-commit-id-maven-plugin.version>10.0.0</git-commit-id-maven-plugin.version>
<dependency-check-maven.version>12.2.2</dependency-check-maven.version>
<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
<versions-maven-plugin.version>2.21.0</versions-maven-plugin.version>
<!-- OpenRewrite versions -->
<rewrite-maven-plugin.version>6.38.0</rewrite-maven-plugin.version>
<rewrite-testing-frameworks.version>3.35.2</rewrite-testing-frameworks.version>
<rewrite-static-analysis.version>2.34.0</rewrite-static-analysis.version>
<rewrite-migrate-java.version>3.34.0</rewrite-migrate-java.version>
<rewrite-recommendations.version>1.15.0</rewrite-recommendations.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Production Dependencies -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-bom</artifactId>
<version>${mockito.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle</artifactId>
<version>${codingstyle.library.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${spotbugs.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${error-prone.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<dependency>
<groupId>one.util</groupId>
<artifactId>streamex</artifactId>
<version>${streamex.version}</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>${equalsverifier.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>${junit-pioneer.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle</artifactId>
<version>${codingstyle.library.version}</version>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>${sortpom-maven-plugin.version}</version>
<configuration>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<createBackupFile>false</createBackupFile>
<sortPlugins>groupId,artifactId</sortPlugins>
<sortExecutions>true</sortExecutions>
<sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
</configuration>
</plugin>
<plugin>
<groupId>com.github.ferstl</groupId>
<artifactId>depgraph-maven-plugin</artifactId>
<version>${depgraph-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>${git-commit-id-maven-plugin.version}</version>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<includeOnlyProperties>
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
</includeOnlyProperties>
<commitIdGenerationMode>full</commitIdGenerationMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<doclint>all,-missing</doclint>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
<tagNameFormat>v@{project.version}</tagNameFormat>
<scmDevelopmentCommitComment>@{prefix} Prepare for next development iteration [skip ci]</scmDevelopmentCommitComment>
<scmReleaseCommitComment>@{prefix} Prepare release [skip ci]</scmReleaseCommitComment>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<encoding>${source.encoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.assertj</groupId>
<artifactId>assertj-assertions-generator-maven-plugin</artifactId>
<version>${assertj-assertions-generator-maven-plugin.version}</version>
<configuration>
<quiet>true</quiet>
<cleanTargetDir>true</cleanTargetDir>
<hierarchical>false</hierarchical>
<generateBddAssertions>false</generateBddAssertions>
<generateJUnitSoftAssertions>false</generateJUnitSoftAssertions>
<generateSoftAssertions>true</generateSoftAssertions>
<templates>
<templatesDirectory>${project.basedir}/etc/assertj-templates/</templatesDirectory>
<assertionsEntryPointClass>assertions_entry_point_class_template.txt</assertionsEntryPointClass>
<assertionEntryPointMethod>assertions_entry_point_method_template.txt</assertionEntryPointMethod>
<softEntryPointAssertionClass>soft_assertions_entry_point_class_template.txt</softEntryPointAssertionClass>
<softEntryPointAssertionMethod>soft_assertions_entry_point_method_template.txt</softEntryPointAssertionMethod>
<objectAssertion>has_assertion_template.txt</objectAssertion>
<assertionClass>assertion_class_template.txt</assertionClass>
<realNumberWrapperAssertion>has_assertion_template_for_real_number_wrapper.txt</realNumberWrapperAssertion>
<wholeNumberWrapperAssertion>has_assertion_template_for_primitive_wrapper.txt</wholeNumberWrapperAssertion>
</templates>
</configuration>
<dependencies>
<!-- Without this dependency mvn test will fail due to a class not found exception -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>generate-assertions</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>${rewrite-maven-plugin.version}</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.maven.BestPractices</recipe>
<recipe>org.openrewrite.maven.RemoveRedundantDependencyVersions</recipe>
<recipe>org.openrewrite.staticanalysis.AddSerialAnnotationToSerialVersionUID</recipe>
<recipe>org.openrewrite.staticanalysis.CodeCleanup</recipe>
<recipe>org.openrewrite.staticanalysis.CommonStaticAnalysis</recipe>
<recipe>org.openrewrite.staticanalysis.MissingOverrideAnnotation</recipe>
<recipe>org.openrewrite.staticanalysis.RemoveExtraSemicolons</recipe>
<recipe>org.openrewrite.staticanalysis.SimplifyTernaryRecipes</recipe>
<recipe>org.openrewrite.java.migrate.UpgradeToJava21</recipe>
<recipe>org.openrewrite.java.migrate.util.JavaUtilAPIs</recipe>
<recipe>org.openrewrite.java.migrate.util.SequencedCollection</recipe>
<recipe>org.openrewrite.java.migrate.lang.StringRulesRecipes</recipe>
<recipe>org.openrewrite.java.migrate.lang.var.UseVarForObject</recipe>
<recipe>org.openrewrite.java.migrate.net.JavaNetAPIs</recipe>
<recipe>org.openrewrite.java.migrate.util.JavaUtilAPIs</recipe>
<recipe>org.openrewrite.java.format.BlankLines</recipe>
<recipe>org.openrewrite.java.format.EmptyNewlineAtEndOfFile</recipe>
<recipe>org.openrewrite.java.format.RemoveTrailingWhitespace</recipe>
<recipe>org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertions</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<version>${rewrite-testing-frameworks.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>${rewrite-static-analysis.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>${rewrite-migrate-java.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recommendations</artifactId>
<version>${rewrite-recommendations.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${dependency-check-maven.version}</version>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest-maven-plugin.version}</version>
<configuration>
<outputFormats>XML,HTML</outputFormats>
<excludedTestClasses>
<param>*ITest</param>
</excludedTestClasses>
<excludedMethods>
<param>*equals</param>
<param>*hashCode</param>
<param>*toString</param>
</excludedMethods>
<features>
<feature>+FCSV(csvFile[etc/pitmute.csv] allowMissingFile[true])</feature>
<feature>+FANNOT</feature>
</features>
</configuration>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>${pitest-junit5-plugin.version}</version>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>pitmute</artifactId>
<version>${pitmute.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>${revapi-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<!-- SUREFIRE-1798 -->
<excludes>
<exclude>**/*ITest.*</exclude>
</excludes>
<argLine>@{argLine} -Djava.util.logging.config.file=logging.properties -javaagent:${org.mockito:mockito-core:jar}</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
<id>default-test</id>
<phase>test</phase>
<configuration>
<excludes combine.children="append">
<exclude>**/archunit/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<goals>
<goal>test</goal>
</goals>
<id>architecture-test</id>
<phase>test</phase>
<configuration>
<includes>
<include>**/archunit/**</include>
</includes>
<reportsDirectory>${project.build.directory}/archunit-reports</reportsDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<threshold>Low</threshold>
<failThreshold>Low</failThreshold>
<effort>Max</effort>
<relaxed>false</relaxed>
<fork>true</fork>
<excludeFilterFile>spotbugs-exclusion-filter.xml</excludeFilterFile>
<includeTests>true</includeTests>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>${findsecbugs-plugin.version}</version>
</plugin>
</plugins>
</configuration>
<dependencies>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle</artifactId>
<version>${codingstyle.config.version}</version>
<classifier>config</classifier>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-spotbugs</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
<excludeGeneratedSources>true</excludeGeneratedSources>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle</artifactId>
<version>${codingstyle.config.version}</version>
<classifier>config</classifier>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-checkstyle-java</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<excludes>**/module-info.java</excludes>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<configLocation>checkstyle-java-configuration.xml</configLocation>
<outputFile>${project.build.directory}/checkstyle-java/checkstyle-result.xml</outputFile>
</configuration>
</execution>
<execution>
<id>run-checkstyle-tests</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<excludes>**/*Assert*.java,**/*_jmh*,**/module-info.java</excludes>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>checkstyle-tests-configuration.xml</configLocation>
<outputFile>${project.build.directory}/checkstyle-tests/checkstyle-result.xml</outputFile>
<sourceDirectories />
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
<path>
<groupId>org.mockito</groupId>
<artifactId>mockito-errorprone</artifactId>
<version>${mockito.version}</version>
</path>
</annotationProcessorPaths>
<?SORTPOM IGNORE?>
<compilerArgs>
<arg>-J-Duser.country=US</arg>
<arg>-J-Duser.language=en</arg>
<arg>-Xlint:all</arg>
<arg>-Xlint:-exports</arg>
<arg>-Xlint:-path</arg>
<arg>-Xlint:-missing-explicit-ctor</arg>
<arg>-Xlint:-requires-transitive-automatic</arg>
<arg>-Xlint:-requires-automatic</arg>
<arg>--should-stop=ifError=FLOW</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>
<!-- The awkward comment formatting used here ensures that the plugin arguments are separated only by spaces.
See https://github.com/google/error-prone/pull/1115 and https://github.com/google/error-prone/issues/4256. -->
<arg>-Xplugin:ErrorProne <!--
ErrorProne configuration:
--> -XepExcludedPaths:.*/generated-test-sources/.* <!--
ErrorProne configuration:
--> -XepIgnoreUnknownCheckNames <!--
ErrorProne configuration:
--> -XepDisableWarningsInGeneratedCode <!--
ErrorProne configuration:
--> -XepAllErrorsAsWarnings <!--
NullAway configuration:
--> -Xep:NullAway:WARN <!--
NullAway configuration:
--> -XepOpt:NullAway:AnnotatedPackages=edu.hm.hafner <!--
Disabled ErrorProne rule:
--> -Xep:SuppressWarningsWithoutExplanation:OFF <!--
Disabled ErrorProne rule:
--> -Xep:PreferredInterfaceType:OFF <!--
Disabled ErrorProne rule:
--> -Xep:YodaCondition:OFF <!--
Disabled ErrorProne rule:
--> -Xep:ReturnMissingNullable:OFF <!--
Disabled ErrorProne rule:
--> -Xep:CannotMockFinalMethod:OFF <!--
Disabled ErrorProne rule:
--> -Xep:Java8ApiChecker:OFF <!--
Disabled ErrorProne rule:
--> -Xep:ImmutableMemberCollection:OFF <!--
Disabled ErrorProne rule:
--> -Xep:PreferJavaTimeOverload:OFF <!--
Disabled ErrorProne rule:
--> -Xep:EqualsGetClass:OFF <!--
Disabled ErrorProne rule:
--> -Xep:AndroidJdkLibsChecker:OFF <!--
Disabled ErrorProne rule:
--> -Xep:Java7ApiChecker:OFF <!--
Disabled ErrorProne rule:
--> -Xep:Var:OFF <!--
Disabled ErrorProne rule:
--> -Xep:PrivateConstructorForUtilityClass:OFF <!--
Disabled ErrorProne rule:
--> -Xep:MethodCanBeStatic:OFF <!--
Disabled ErrorProne rule:
--> -Xep:WildcardImport:OFF <!--
Disabled ErrorProne rule:
--> -Xep:ThrowsUncheckedException:OFF <!--
Disabled ErrorProne rule:
--> -Xep:UnusedMethod:OFF <!--
Disabled ErrorProne rule:
--> -Xep:BooleanParameter:OFF <!--
Disabled ErrorProne rule:
--> -Xep:UnnecessaryFinal:OFF <!--
Disabled ErrorProne rule:
--> -Xep:NullableDereference:OFF
</arg>
<!-- The Error Prone plugin makes certain
assumptions about the state of the AST at the
moment it is invoked. Those assumptions are met
when using the `simple` compile policy. This
flag may be dropped after resolution of
https://bugs.openjdk.java.net/browse/JDK-8155674. -->
<arg>-XDcompilePolicy=simple</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
</compilerArgs>
<?SORTPOM RESUME?>
<fork>true</fork>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[21,22),[25,26)</version>
<message>Java LTS 21 or 25 is required to build this project.</message>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/*ITest.*</include>
</includes>
<reuseForks>false</reuseForks>
<argLine>@{argLine} -Djava.util.logging.config.file=logging.properties -javaagent:${org.mockito:mockito-core:jar}</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Built-By>Ullrich Hafner</Built-By>
<Url>${project.scm.url}</Url>
<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
<targetJdk>${java.version}</targetJdk>
<skip>true</skip>
</configuration>
<dependencies>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.metrics.version}</version>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.metrics.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle</artifactId>
<version>${codingstyle.config.version}</version>
<classifier>config</classifier>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-pmd-java</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
<goal>cpd</goal>
</goals>
<phase>verify</phase>
<configuration>
<targetDirectory>${project.build.directory}/pmd-java</targetDirectory>
<rulesets>
<ruleset>pmd-java-configuration.xml</ruleset>
</rulesets>
<includeTests>false</includeTests>
<minimumTokens>50</minimumTokens>
<printFailingErrors>true</printFailingErrors>
<skip>${pmd.skip}</skip>
</configuration>
</execution>
<execution>
<id>run-pmd-javascript</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<targetDirectory>${project.build.directory}/pmd-javascript</targetDirectory>
<rulesets>
<ruleset>pmd-javascript-configuration.xml</ruleset>
</rulesets>
<includeTests>false</includeTests>
<language>javascript</language>
<printFailingErrors>true</printFailingErrors>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/resources</compileSourceRoot>
<compileSourceRoot>${project.basedir}/src/main/webapp/js</compileSourceRoot>
</compileSourceRoots>
<includes>
<include>**/*.js</include>
</includes>
<skip>${pmd.skip}</skip>
</configuration>
</execution>
<execution>
<id>run-pmd-metrics</id>
<goals>
<goal>pmd</goal>
</goals>
<phase>verify</phase>
<configuration>
<targetDirectory>${project.build.directory}/metrics</targetDirectory>
<rulesets>
<ruleset>/category/java/metric.xml</ruleset>
</rulesets>
<format>net.sourceforge.pmd.renderers.MetricsRenderer</format>
<includeTests>false</includeTests>
<skip>${pmd.skip}</skip>
</configuration>
</execution>
<execution>
<id>run-pmd-tests</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
<goal>cpd</goal>
</goals>
<phase>verify</phase>
<configuration>
<targetDirectory>${project.build.directory}/pmd-tests</targetDirectory>
<rulesets>
<ruleset>pmd-tests-configuration.xml</ruleset>
</rulesets>
<includeTests>true</includeTests>
<minimumTokens>100</minimumTokens>
<printFailingErrors>true</printFailingErrors>
<excludeRoots>
<excludeRoot>src/main/java</excludeRoot>
<excludeRoot>${project.build.directory}/generated-test-sources/test-annotations</excludeRoot>
<excludeRoot>${project.build.directory}/generated-test-sources/assertj-assertions</excludeRoot>
</excludeRoots>
<skip>${pmd.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
<phase>process-test-classes</phase>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<configuration>
<versionFormat>[-0-9.]*</versionFormat>
<failBuildOnProblemsFound>true</failBuildOnProblemsFound>
<checkDependencies>true</checkDependencies>
<failOnUnresolvedArtifacts>true</failOnUnresolvedArtifacts>
<pipelineConfiguration>
<transformBlocks>
<block>
<item>manually-vetted</item>
<item>revapi.versions</item>
</block>
</transformBlocks>
</pipelineConfiguration>
<analysisConfiguration>
<revapi.differences id="manually-vetted">
<attachments>
<vetted>ok</vetted>
</attachments>
<differences>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.annotation.removed</code>
<annotation>@edu.umd.cs.findbugs.annotations.SuppressFBWarnings.*</annotation>
<justification>SpotBugs Annotations are not relevant in API</justification>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.annotation.*</code>
<annotation>@edu.hm.hafner.util.SuppressMutation.*</annotation>
<justification>PitMute Annotations are not relevant in API</justification>
</item>
</differences>
</revapi.differences>
<revapi.versions>
<enabled>true</enabled>
<strictSemver>false</strictSemver>
<onAllowed>
<criticality>documented</criticality>
<justification>Allowed by the rules of semantic versioning.</justification>
</onAllowed>
</revapi.versions>
<revapi.reporter.json>
<minSeverity>NON_BREAKING</minSeverity>
<minCriticality>documented</minCriticality>
<output>${project.build.directory}/revapi-result.json</output>
<indent>true</indent>
<append>false</append>
<keepEmptyFile>true</keepEmptyFile>
</revapi.reporter.json>
</analysisConfiguration>
</configuration>
<dependencies>
<dependency>
<groupId>org.revapi</groupId>
<artifactId>revapi-java</artifactId>
<version>${revapi-java.version}</version>
</dependency>
<dependency>
<groupId>org.revapi</groupId>
<artifactId>revapi-reporter-json</artifactId>
<version>${revapi-reporter-json-version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-revapi</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>skip</id>
<properties>
<checkstyle.skip>true</checkstyle.skip>
<gpg.skip>true</gpg.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<pmd.skip>true</pmd.skip>
<revapi.skip>true</revapi.skip>
<skipITs>true</skipITs>
<skipTests>true</skipTests>
<spotbugs.skip>true</spotbugs.skip>
</properties>
</profile>
<profile>
<id>ci</id>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<checkstyle.failOnViolation>false</checkstyle.failOnViolation>
<pmd.failOnViolation>false</pmd.failOnViolation>
<spotbugs.failOnError>false</spotbugs.failOnError>
<gpg.skip>true</gpg.skip>
<revapi.failBuildOnProblemsFound>false</revapi.failBuildOnProblemsFound>
</properties>
</profile>
<profile>
<id>pit</id>
<build>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<executions>
<execution>
<id>test</id>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>owasp</id>
<build>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<format>JSON</format>
<nvdApiKeyEnvironmentVariable>NVD_API_KEY</nvdApiKeyEnvironmentVariable>
<ossIndexAnalyzerEnabled>false</ossIndexAnalyzerEnabled>
<ossIndexWarnOnlyOnRemoteErrors>true</ossIndexWarnOnlyOnRemoteErrors>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>depgraph</id>
<build>
<plugins>
<plugin>
<groupId>com.github.ferstl</groupId>
<artifactId>depgraph-maven-plugin</artifactId>
<configuration>
<graphFormat>puml</graphFormat>
<classpathScope>compile</classpathScope>
<showClassifiers>true</showClassifiers>
<showVersions>true</showVersions>
<showConflicts>true</showConflicts>
<showDuplicates>true</showDuplicates>
<outputFileName>dependency-graph</outputFileName>
<outputDirectory>${project.basedir}/doc</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>graph</goal>
</goals>
<phase>verify</phase>
</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>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>