Maven Enforcers
The following are the list of Maven enforcers and examples on how to use each.
warning
These checks will NOT recurse to the provided files descendents and children dependencies.
MavenBannedProperties
Enforcer Name: .maven.MavenBannedProperties
An enforcer which enforces that the provided properties are not set.
note
This will check the <properties></properties>
section of you repository-path file.
Example
MavenDependencies
Enforcer Name: .maven.MavenDependencies
An enforcer which enforces that the coordinates of the maven dependencies are as expected.
info
For version matching regex is supported. Version is also optional to only require group and artifact match.
note
This will check the <dependencies></dependencies>
section of you repository-path file.
Example
MavenParentEquals
Enforcer Name: .maven.MavenParentEquals
An enforcer which enforces that the coordinates of the maven parent are as expected.
info
For version matching regex is supported. Version is also optional to only require group and artifact match.
note
This will check the <parent></parent>
section of you repository-path file.
Example
MavenPlugins
Enforcer Name: .maven.MavenPlugins
An enforcer which enforces that the coordinates of the maven plugins are as expected
info
For version matching regex is supported. Version is also optional to only require group and artifact match.
note
This will check the <plugins></plugins>
section of you repository-path file.
Example