In Maven, how can I exclude all transitive dependencies from a particular dependency?

后端 未结 3 2019
醉梦人生
醉梦人生 2020-12-31 02:08

I want to exclude all transitive dependencies from one dependency. In some places I\'ve seen it suggested to use a wildcard for that


  <         


        
相关标签:
3条回答
  • 2020-12-31 02:43

    I hate getting Maven warnings myself. I've seen the wildcard approach but have avoided it. Run a mvn dependency:tree goal, discover the top-level dependencies belonging to the artefact in question and exclude each one individually (hopefully the list isn't so vast). This is by far the safest way to approach this problem.

    0 讨论(0)
  • 2020-12-31 02:56

    This is a supported feature in Maven 3.2.1 - see 'Transitive dependency excludes' section in the release notes.

    0 讨论(0)
  • 2020-12-31 03:03

    As to my knowing, this feature does not yet exist. In the feature request you sent, you can see it's status is still "Unresolved".

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