enforcer-rules
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>io.github.cedricsoual</groupId> <artifactId>enforcer-rules</artifactId> <version>0.1.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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.github.cedricsoual</groupId> <artifactId>enforcer-rules</artifactId> <version>0.1.0</version> <name>Enforcer Rules</name> <description>Additional custom rules for Maven Enforcer</description> <url>https://github.com/cedricsoual/enforcer-rules</url> <inceptionYear>2024</inceptionYear> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>11</java.version> <maven.compiler.release>${java.version}</maven.compiler.release> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.14.0</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> <version>3.9.5</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> <version>3.9.5</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>3.9.5</version> </dependency> <dependency> <groupId>org.apache.maven.enforcer</groupId> <artifactId>enforcer-api</artifactId> <version>3.4.1</version> </dependency> <dependency> <groupId>org.apache.maven.enforcer</groupId> <artifactId>enforcer-rules</artifactId> <version>3.4.1</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>3.19.0</version> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.10.0</version> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <version>5.10.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-classworlds</artifactId> <version>2.7.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-component-annotations</artifactId> <version>2.1.0</version> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M9</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.5.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.2.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.10.1</version> </plugin> <plugin> <groupId>org.jreleaser</groupId> <artifactId>jreleaser-maven-plugin</artifactId> <version>1.5.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <version>3.6.0</version> <configuration> <showErrors>true</showErrors> <streamLogs>false</streamLogs> <settingsFile>src/it/settings.xml</settingsFile> <postBuildHookScript>verify</postBuildHookScript> <addTestClassPath>true</addTestClassPath> <!--uncomment next line to debug invoker tests--> <!--<mavenOpts>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</mavenOpts>--> </configuration> <executions> <execution> <goals> <goal>install</goal> <goal>run</goal> </goals> <configuration> <pomIncludes> <pomInclude>**/pom.xml</pomInclude> <!-- Include sub directories --> </pomIncludes> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>ci</id> <build> <plugins> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.10</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <goals> <goal>report</goal> </goals> <phase>test</phase> </execution> </executions> </plugin> <plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <version>1.15.1</version> <configuration> <verbose>true</verbose> <targetClasses> <param>io.github.cedricsoual.enforcer.rules.*</param> </targetClasses> <targetTests> <param>io.github.cedricsoual.enforcer.rules.*</param> </targetTests> <historyInputFile>${project.build.directory}/pitest.history</historyInputFile> <historyOutputFile>${project.build.directory}/pitest.history</historyOutputFile> <outputFormats> <outputFormat>XML</outputFormat> <outputFormat>HTML</outputFormat> </outputFormats> <timestampedReports>false</timestampedReports> <mutationThreshold>40</mutationThreshold> <avoidCallsTo> <avoidCallsTo>java.util.logging</avoidCallsTo> <avoidCallsTo>org.apache.log4j</avoidCallsTo> <avoidCallsTo>org.slf4j</avoidCallsTo> <avoidCallsTo>org.apache.commons.logging</avoidCallsTo> <avoidCallsTo>io.micrometer</avoidCallsTo> </avoidCallsTo> </configuration> <dependencies> <dependency> <groupId>org.pitest</groupId> <artifactId>pitest-junit5-plugin</artifactId> <version>1.1.1</version> </dependency> </dependencies> <executions> <execution> <goals> <goal>mutationCoverage</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.4.0</version> <executions> <execution> <id>default-cli</id> <goals> <goal>enforce</goal> </goals> <phase>validate</phase> <configuration> <rules> <dependencyConvergence/> <banDuplicatePomDependencyVersions/> <banDynamicVersions/> <banDependencyManagementScope/> <requireUpperBoundDeps/> <requireJavaVersion> <version>11</version> </requireJavaVersion> <requireMavenVersion> <version>[3.9.0,)</version> </requireMavenVersion> <requirePluginVersions> <message>Best Practice is to always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease> <banSnapshots>true</banSnapshots> <phases>validate,clean,deploy,site</phases> <unCheckedPluginList> org.apache.maven.plugins:maven-clean-plugin, org.apache.maven.plugins:maven-install-plugin, org.apache.maven.plugins:maven-site-plugin, org.apache.maven.plugins:maven-deploy-plugin, org.apache.maven.plugins:maven-resources-plugin, org.apache.maven.plugins:maven-jar-plugin </unCheckedPluginList> </requirePluginVersions> <requireReleaseDeps> <onlyWhenRelease>true</onlyWhenRelease> </requireReleaseDeps> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>3.3.0</version> <configuration> <skip>false</skip> <logViolationsToConsole>true</logViolationsToConsole> <configLocation>ci/checkstyle-rules.xml</configLocation> <suppressionsLocation>ci/checkstyle-suppressions.xml</suppressionsLocation> <violationSeverity>warning</violationSeverity> <failOnViolation>true</failOnViolation> </configuration> <executions> <execution> <id>verify-style</id> <goals> <goal>check</goal> </goals> <phase>validate</phase> </execution> </executions> </plugin> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>2.40.0</version> <configuration> <skip>true</skip> <java> <googleJavaFormat> <reorderImports>false</reorderImports> </googleJavaFormat> <removeUnusedImports/> <formatAnnotations/> <includes> <include>src/main/java/**/*.java</include> <include>src/test/java/**/*.java</include> <include>src/it/java/**/*.java</include> </includes> </java> <pom> <includes> <include>pom.xml</include> </includes> <sortPom> <encoding>UTF-8</encoding> <expandEmptyElements>false</expandEmptyElements> <indentBlankLines>true</indentBlankLines> <indentSchemaLocation>false</indentSchemaLocation> <keepBlankLines>true</keepBlankLines> <lineSeparator>${line.separator}</lineSeparator> <nrOfIndentSpace>4</nrOfIndentSpace> <predefinedSortOrder>recommended_2008_06</predefinedSortOrder> <sortDependencies>type,scope,groupId,artifactId</sortDependencies> <sortExecutions>false</sortExecutions> <sortModules>false</sortModules> <sortProperties>true</sortProperties> <spaceBeforeCloseEmptyElement>false</spaceBeforeCloseEmptyElement> </sortPom> </pom> </configuration> <executions> <execution> <goals> <goal>check</goal> </goals> <phase>validate</phase> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>release</id> <properties> <altDeploymentRepository>local::default::file:./target/staging-deploy</altDeploymentRepository> </properties> <build> <defaultGoal>deploy</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <id>attach-javadoc</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-source</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <version>3.1.0</version> <executions> <execution> <id>sign-artifacts</id> <phase>verify</phase> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.sonatype.central</groupId> <artifactId>central-publishing-maven-plugin</artifactId> <version>0.1.6</version> <extensions>true</extensions> <configuration> <publishingServerId>central</publishingServerId> <tokenEnabled>true</tokenEnabled> </configuration> </plugin> </plugins> </build> </profile> </profiles> <dependencies> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> </dependency> <dependency> <groupId>org.apache.maven.enforcer</groupId> <artifactId>enforcer-api</artifactId> </dependency> <dependency> <groupId>org.apache.maven.enforcer</groupId> <artifactId>enforcer-rules</artifactId> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> </dependencies> <scm> <url>https://github.com/cedricsoual/enforcer-rules</url> <connection>scm:git:git://github.com/cedricsoual/enforcer-rules.git</connection> <developerConnection>scm:git:ssh://git@github.com/cedricsoual/enforcer-rules.git</developerConnection> <tag>HEAD</tag> </scm> <licenses> <license> <name>MIT License</name> <url>http://www.opensource.org/licenses/mit-license.php</url> <distribution>repo</distribution> </license> </licenses> <developers> <developer> <id>cedricsoual</id> <name>Cedric Soual</name> </developer> </developers> </project>