Skip to content

Instantly share code, notes, and snippets.

@jhaber
Created April 2, 2015 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhaber/65e34552c18e5ac9fd31 to your computer and use it in GitHub Desktop.
Save jhaber/65e34552c18e5ac9fd31 to your computer and use it in GitHub Desktop.
maven-enforcer-example
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<fail>true</fail>
<rules>
<bannedDependencies>
<excludes>
<exclude>asm:asm</exclude>
<exclude>cglib:cglib:(,3.2)</exclude>
<exclude>cglib:cglib-nodep</exclude>
<exclude>com.esotericsoftware:reflectasm:(,1.11.0)</exclude>
<exclude>com.sun.jersey:jersey-server:(,1.19)</exclude>
<exclude>org.easymock:easymock:(,3.3.1)</exclude>
<exclude>org.jdbi:jdbi:(,2.60)</exclude>
<exclude>org.jruby:jruby-complete</exclude>
<exclude>org.mockito:mockito-all</exclude>
<exclude>org.mockito:mockito-core:(,1.10.17)</exclude>
<exclude>org.ow2.asm:asm:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-all:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-analysis:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-commons:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-parent:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-tree:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-util:(,5.0.3)</exclude>
<exclude>org.ow2.asm:asm-xml:(,5.0.3)</exclude>
<exclude>org.parboiled:parboiled-java:(,1.1.7)</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment