Exclusion of dependencies not reflected in pom.xml

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

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

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.

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.