Created
April 19, 2011 18:59
-
-
Save jaxzin/929276 to your computer and use it in GitHub Desktop.
Ban logging dependencies that collide with slf4j or your chosen logging implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<version>1.0-alpha-3</version> | |
<executions> | |
<execution> | |
<id>ban-other-loggers</id> | |
<goals> | |
<goal>enforce</goal> | |
</goals> | |
<configuration> | |
<rules> | |
<bannedDependencies> | |
<searchTransitive>true</searchTransitive> | |
<excludes> | |
<!-- Ban the secondary frameworks --> | |
<exclude>log4j:log4j</exclude> | |
<exclude>commons-logging</exclude> | |
<!-- Ban other slf4j bridges so | |
we don't end up in an infinite loop --> | |
<exclude>org.slf4j:slf4j-log4j12</exclude> | |
</excludes> | |
<message>Secondary logging frameworks are | |
banned in preference to org.slf4j:*-over-slf4j</message> | |
</bannedDependencies> | |
</rules> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment