Exclusion of dependencies not reflected in pom.xml


(Etienne Studer) #1

If I define exclusions like below, these exclusions are not reflected in the pom.xml as excludes:

compile (‘org.activiti:activiti-spring:5.8’) {

   exclude group: 'org.springframework' , module: 'spring-jdbc'

}

Seems a bug to me, or maybe there is a correct way to achieve this?

Regards, Etienne


(Peter Niederwieser) #2

Works for me. Can you provide a self-contained build script exhibiting the problem?


(Guy Brand) #3

It works if we define the exclusion with group and module:

compile (versionedDependency('org.activiti:activiti-spring')) {
 exclude group: 'org.springframework' , module: 'spring-jdbc'
}

but if we want to exclude a whole groupe like this:

compile (versionedDependency('org.activiti:activiti-spring')) {
 exclude group: 'org.springframework'
}

it doesn’t add the tag inside the pom configuration tag for spring.


(Peter Niederwieser) #4

Exclusion by group only (or by module only) isn’t reflected in the POM because it isn’t supported by Maven. It might be possible to make a smart translation, however that’s not currently implemented.