How to exclude transitive dependencies from a configuration

(Carlo Luib-Finetti) #1

When I define a configuration like this:

configurations {
 compile.transitive = false

and later use this configuration to write entries into a Eclipse MANIFEST.MF like this:

manifest {
       def manif = "${projectDir}/META-INF/MANIFEST.MF"
 from (manif) {
  eachEntry { details ->
     if (details.key == 'Bundle-ClassPath') {
       details.value = configurations.jax_ws.collect { 'lib/' + }

I would expect that there will be no transitive dependent jars in the written values. But there are.

What do I have to do to exclude those transitive dependencies?

(Peter Niederwieser) #2

Looks like you’ll have to set the ‘jax_ws’ configuration to non-transitive, not the ‘compile’ configuration.

(Carlo Luib-Finetti) #3

Thanks Peter, of course this should not be the compile but the jax_ws-configuration.

(“when a blind man cries”)