I have this dependency tree: A->B->C->D
. A
is the main project. I would like to know if it’s possible to exclude only D
from A
without needing to add explicitly C
to A
?
Thanks
Please refer following maven documentation which contains an example and covers your use case:
https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
Following is example snapshot for quick reference: