Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn
net/oneandone/maven/poms/fossconfigs
src
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

ono-extra-enforcer-rules

Latest Travis-Build: Build Status

Rules

<ForbidOverridingManagedDependenciesRule />

Forbids overriding dependency management of parent.

<ForbidOverridingManagedPluginsRule />

Forbids overriding plugin management of parent.

<ForbidDependencyManagementInSubModulesRule />

Forbids dependency management in submodules.

<excludes>
    <exclude>javax.validation:validation-api</exclude>
</excludes>

The rules above can define excludes. The check is a simple startsWith on $groupId:$artifactId

<ManageAllModulesRule />

Checks if all submodules of a multimodule are defined in dependency management.

Example

<build>
    <plugins>
        <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>net.oneandone.maven</groupId>
                    <artifactId>ono-extra-enforcer-rules</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
            <configuration>
                <rules>
                    <ForbidOverridingManagedDependenciesRule>
                            <excludes>
                                <!-- guava in parent is too old, so allow to override it -->
                                <exclude>com.google.guava:guava</exclude>
                            </excludes>
                    </ForbidOverridingManagedDependenciesRule>
                    <ForbidOverridingManagedPluginsRule />
                    <ForbidDependencyManagementInSubModulesRule />
                    <ManageAllModulesRule />
                </rules>
            </configuration>
        </plugin>
    </plugins>
</build>
You can’t perform that action at this time.