Require Prerequisites

This rule enforces that the prerequisite is specified since it is not inherited from its parent. Defining the prerequisites is especially useful for plugins to enforce at least a certain version of Maven.

The following parameters are supported by this rule:

Sample Plugin Configuration:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.3.1</version>
        <executions>
          <execution>
            <id>enforce-prerequisites</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requirePrerequisites>
                  <mavenVersion>2.2.1</mavenVersion>
                </requirePrerequisites>
                <!-- same rule, different notation -->
                <requirePrerequisites>
                  <mavenVersion>[2.2.1,)</mavenVersion>
                </requirePrerequisites>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>