Maven 2 Rules Compiler Plugin: Usage

Compiling Your Rules Sources

The goals for the Rules Compiler Plugin are bound to their respective phases in the build lifecycle. So to compile your rules sources, you only need to tell maven which lifecycle to execute. The following will compile your rules sources:

mvn compile

To compile your test rules sources, you'll do:

mvn test-compile

The above command will execute both rules-compiler:compile and rules-compiler:test-compile since the compile phase happens a few phases before the test-compile phase.

Configuring Your Rules Compiler Plugin

Since the Rules Compiler Plugin executes automatically during their phases, you don't have to put executions unlike the other plugins.

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>net.sourceforge.rules</groupId>
        <artifactId>rules-compiler-plugin</artifactId>
        <configuration>
          <!-- put your configurations here -->
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>