Skip to content

Instantly share code, notes, and snippets.

@nikolavp
Created November 5, 2014 12:34
Show Gist options
  • Save nikolavp/269fa6a4f469229e90ef to your computer and use it in GitHub Desktop.
Save nikolavp/269fa6a4f469229e90ef to your computer and use it in GitHub Desktop.
Enforcer setup
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
<!--<DependencyConvergence />-->
<bannedDependencies>
<excludes>
<!-- This should not exist as it will force SLF4J calls to be delegated to log4j -->
<exclude>org.slf4j:slf4j-log4j12</exclude>
<!-- This should not exist as it will force SLF4J calls to be delegated to jul -->
<exclude>org.slf4j:slf4j-jdk14</exclude>
<!-- Ensure only the slf4j binding for logback is on the classpath -->
<exclude>log4j:log4j</exclude>
<!-- As recommended from the slf4j guide, exclude commons-logging -->
<exclude>commons-logging:commons-logging</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment