Fork me on GitHub

Configuration

The enforcer rule maven-enforcer-rule-depend-on-all-projects has the following configuration parameters:

  • <includes>

Include these projects. Default: include every project.

Example:

<includes>
    <include>project-subroot-*</include>
    <include>com.github.mikkoi:project-thing:war</include>
</includes>
  • <excludes>

Exclude these projects. If both <includes> and <excludes> are defined, then <includes> are used to select projects, and <excludes> are applied to remove projects from that selection.

Example:

<excludes>
    <exclude>project-excluded</exclude>
    <exclude>com.github.mikkoi:project-subroot-*</exclude>
    <exclude>com.github.mikkoi:project-thing:war</exclude>
</excludes>
  • <includeRootProject>

Default: false

Set to true to include the root project in the dependencies.

<includeRootProject>true</includeRootProject>
  • <errorIfUnknownProject>

Default: false

If a full project name (groupId and artifactId) is used in <includes> or <excludes>, and the referenced project is not part of the Maven reactor, the build fails with an error. This helps prevent outdated configuration.

<errorIfUnknownProject>true</errorIfUnknownProject>