<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>
<CheckMavenCentral implementation="org.kordamp.maven.enforcer.checker.CheckMavenCentral"/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>
CheckMavenCentral
Properties
- release
-
Disallows
-SNAPSHOT
versions if set totrue
. Defaults totrue
. - strict
-
Disallows
<repositories>
and<pluginRepositories>
if set totrue
. Defaults totrue
. - failOnError
-
Fails the build on error. Defaults to
true
. - failOnWarning
-
Fails the build on warning. Defaults to
false
.