Skip to content

Instantly share code, notes, and snippets.

@whaley
Created January 23, 2015 13:13
Show Gist options
  • Select an option

  • Save whaley/9e300f8238ac098042b3 to your computer and use it in GitHub Desktop.

Select an option

Save whaley/9e300f8238ac098042b3 to your computer and use it in GitHub Desktop.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<!-- JDK7 and Maven 3.0.3+ are expected -->
<execution>
<id>enforce-environment-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0.3</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.7.0</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
<!-- Enforce Proper Declaration of Dependencies -->
<execution>
<id>enforce-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- Require explicit declaration of the highest version of dependency that is a
transitive dependency of two other direct dependencies -->
<dependencyConvergence/>
<requireUpperBoundsDeps/>
<!-- All plugins must have a version declared -->
<requirePluginVersions/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment