Is there anyway to exclude artifacts inherited from a parent POM?

后端 未结 9 1226
礼貌的吻别
礼貌的吻别 2020-11-30 22:02

Artifacts from dependencies can be excluded by declaring an element inside a But in this case it\'s needed to

9条回答
  •  星月不相逢
    2020-11-30 22:44

    Best bet is to make the dependencies you don't always want to inherit intransitive.

    You can do this by marking them in the parent pom with scope provided.

    If you still want the parent to manage versions of these deps, you can use the tag to setup the versions you want without explicitly inheriting them, or passing that inheritance along to children.

提交回复
热议问题