'How to configure Apache Maven settings.xml to prevent downloading specific dependecies\plugin

I want to configure settings.xml to prevent downloading vulnerable versions of log4j. I see that maven can banned specific dependencies defined in pom.xml, but can it also be done in settings.xml?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source