How to exclude a direct dependency of a Maven Plugin

后端 未结 3 1048
天涯浪人
天涯浪人 2021-01-04 05:22

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

相关标签:
3条回答
  • 2021-01-04 05:41

    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

    0 讨论(0)
  • 2021-01-04 05:56

    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.

    0 讨论(0)
  • 2021-01-04 05:56

    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.

    0 讨论(0)
提交回复
热议问题