Artifacts from dependencies can be excluded by declaring an element inside a But in this case it\'s needed to
You can group your dependencies within a different project with packaging pom as described by Sonatypes Best Practices:
4.0.0
base-dependencies
es.uniovi.innova
1.0.0
pom
javax.mail
mail
1.4
and reference them from your parent-pom (watch the dependency ):
4.0.0
base
es.uniovi.innova
1.0.0
pom
base-dependencies
es.uniovi.innova
1.0.0
pom
Your child-project inherits this parent-pom as before. But now, the mail dependency can be excluded in the child-project within the dependencyManagement block:
4.0.0
test
jruby
0.0.1-SNAPSHOT
base
es.uniovi.innova
1.0.0
base-dependencies
es.uniovi.innova
1.0.0
javax.mail
mail