A collection of rules for the Maven Enforcer Plugin.

Search


References

Legal Stuff

  • Cannot render Information System Macro: Unknown system: site
  • Cannot render Information System Macro: Unknown system: site
  • Impressum
  • Cannot render Information System Macro: Unknown system: site

version 1.0.2

Introduction

Provides a collection of rules for the Maven Enforcer Plugin.

List of Rules

The list of rules for the Maven Enforcer provided by this project.

Integration

Add the rules library to your Maven Enforcer Plugin's configuration like this:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>${maven-enforcer-plugin.version}</version>
  <executions>
    <execution>
      <id>enforce-project-rules</id>
      <phase>test</phase>
      <goals>
        <goal>enforce</goal>
      </goals>
      <configuration>
        <rules>
         <NoCyclicPackageDependencyRule implementation=
          "de.smartics.maven.enforcer.rule.NoCyclicPackageDependencyRule"
         />
         <NoSnapshotDependenciesInDependencyManagementRule implementation=
          "de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule"
         />
        </rules>
      </configuration>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>
</plugin>

As you can see above, the rules to enforce on the project are named in the rules section of the plugin's configuration.

Related Projects

PMD Rules
Provides rules for PMD.
Checkstyle Rules
Provides rules for Checkstyle.