I want to exclude a direct dependency of a Maven plugin and the approach described in this answer does not work (as indicated by this comment).
As a particular examp
Check your dependency list with dependency:tree and solve WTF lib is introducing that lib dependency, then exclude in it. Maybe you dependency couldn't be direct one.
I hope to help u.
Edit: Just follow your dependency hierarchy
Up until now there hasn't been any reason to do this, but this seems like a valid one. Most clean solution I can think of is allowing to override the scope with "none" for plugin dependencies.
I've created MNG-6222 for it, not sure if we'll fix this for a Maven3, but it makes sense to do it at least for the next major.
I had a similar situation with maven-linkcheck-plugin
in the end I did a more brute force approach to remove the doxia-linkcheck
dependency and make it use my fork by forking maven-linkcheck-plugin
and creating my own with the proper dependencies.