diff options
Diffstat (limited to 'doc/note/maven-pom/howto-ban-unwanted-sh__.txt')
-rw-r--r-- | doc/note/maven-pom/howto-ban-unwanted-sh__.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/note/maven-pom/howto-ban-unwanted-sh__.txt b/doc/note/maven-pom/howto-ban-unwanted-sh__.txt new file mode 100644 index 0000000..1edad9b --- /dev/null +++ b/doc/note/maven-pom/howto-ban-unwanted-sh__.txt @@ -0,0 +1,41 @@ + + + <project> + <dependencies> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <version>[0.0.0,)</version> + <scope>provided</scope> + </dependency> + </dependencies> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <!--<version>1.4.1</version>--> + <version>3.4.1</version> + <executions> + <execution> + <goals><goal>enforce</goal></goals> + <configuration> + <rules> + <bannedDependencies> + <excludes> + <exclude>org.apache.logging.log4j:log4j-slf4j-impl</exclude> + </excludes> + </bannedDependencies> + </rules> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + <project> + + +## Sources + +- [How to globally exclude mvn dependency](https://stackoverflow.com/a/39979760/4415884) +- [How to yell about bannded dependencies](https://stackoverflow.com/a/46104531/4415884) + |