Skip to content

Instantly share code, notes, and snippets.

@xkr47
Created August 13, 2013 08:28
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 xkr47/6219032 to your computer and use it in GitHub Desktop.
Save xkr47/6219032 to your computer and use it in GitHub Desktop.
pom.xml: When using slf4j, make sure we don't accidentally depend on commons-logging
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>ban-unwanted-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- documentation at: https://maven.apache.org/enforcer/enforcer-rules/index.html -->
<bannedDependencies>
<excludes>
<exclude>commons-logging:commons-logging</exclude> <!-- use jcl-over-slf4j instead -->
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment