Add enforcer plugin optionally for dependency convergence

Just do "mvn enforcer:enforce" in any project to see the result
(also prints during a normal build)
This commit is contained in:
Dave Syer
2016-01-26 16:01:46 +00:00
parent 4cd6e5cc22
commit 0b0adffb3f
2 changed files with 44 additions and 0 deletions

19
pom.xml
View File

@@ -84,6 +84,25 @@ limitations under the License.
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<fail>false</fail>
<rules>
<dependencyConvergence/>
</rules>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>

View File

@@ -125,4 +125,29 @@ limitations under the License.
</distributionManagement>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<fail>false</fail>
<rules>
<dependencyConvergence/>
</rules>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>