<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>org.kordamp.maven</groupId>
<artifactId>pomchecker-enforcer-rules</artifactId>
<version>1.11.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<CheckBom implementation="org.kordamp.maven.enforcer.checker.CheckBom"/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>
CheckBom
Checks that a POM is a minimal BOM.
Minimal BOM files contain the following elements:
-
<groupId>
-
<artifactId>
-
<version>
-
<dependencyManagement>
Properties
- failOnError
-
Fails the build on error. Defaults to
true
.
Sample plugin configuration