Walkmod Maven Plugin – Usage

Usage

There are three supported goals: “apply”, “check”, “patch”.

If you already have a walkmod configuration file (walkmod.xml or walkmod.yml), you can easily integrate it as follows:

<plugin>
  <groupId>org.walkmod.maven.plugins</groupId>
  <artifactId>walkmod-maven-plugin</artifactId>
  <version>2.0.1</version>
  <executions>
    <execution>
      <goals>
        <goal>apply</goal>
      </goals>
    </execution>
  </executions>
</plugin>

And then, call the plugin:

mvn org.walkmod.maven.plugins:walkmod-maven-plugin:apply

Running PMD quick fixes

If you only need to run PMD fixings, you can easily run them as follows:

mvn org.walkmod.maven.plugins:walkmod-maven-plugin:apply -Dchains=pmd -Dproperties="configurationFile=rulesets/java/basic.xml"

or alternatively:

<plugin>
  <groupId>org.walkmod.maven.plugins</groupId>
  <artifactId>walkmod-maven-plugin</artifactId>
  <version>2.0.1</version>
  <executions>
    <execution>

      <goals>
        <goal>apply</goal>
      </goals>
      <configuration>
         <chains>pmd</chains>
         <properties>rulesets/java/basic.xml</properties>
      </configuration>
    </execution>
  </executions>
</plugin>