-
-
Save gkhays/6df14ffe6d06fcbff510389c03dfd349 to your computer and use it in GitHub Desktop.
Example enforcer rule to exclude commons-collections 3.2.1 from the build
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
<!-- Avoid the M.A.D. Gadget vulnerability in certain apache commons-collections versions --> | |
<project> | |
<!-- ... --> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals><goal>enforce</goal></goals> | |
<configuration> | |
<rules> | |
<bannedDependencies> | |
<excludes> | |
<exclude>commons-collections:commons-collections:[3.0,3.2.1]</exclude> | |
<exclude>commons-collections:commons-collections:4.0</exclude> | |
</excludes> | |
</bannedDependencies> | |
</rules> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment