# Excluding a module from configuration in subproject not wokring

**URL:** https://discuss.gradle.org/t/excluding-a-module-from-configuration-in-subproject-not-wokring/35243
**Category:** Help/Discuss
**Created:** [March 12, 2020, 4:11pm UTC](https://discuss.gradle.org/t/excluding-a-module-from-configuration-in-subproject-not-wokring/35243 "2020-03-12T16:11:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rohan.palkar](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rohan.palkar](https://discuss.gradle.org/u/rohan.palkar)
#### Post date: [March 12, 2020, 4:11pm UTC](https://discuss.gradle.org/t/excluding-a-module-from-configuration-in-subproject-not-wokring/35243/1 "2020-03-12T16:11:38Z")

</div>

I have got a gradle project (gradle 2.0), with multiple sub-projects, and I am adding a new sub-project (which in it self is having sub-projects) and the settings.gradle looks something like -

```
include ':subproject-a',
                  ':subproject-b',
                  ...
                  ...
                  ':my_new_sub_project-rohan',
                  ':my_new_sub_project-rohan:abc-rohan',
                  ':my_new_sub_project-rohan:xyz-rohan'

```

The root build.gradle is adding a _org.codehaus.jackson_ module dependency, coming from a predefined configuration **TestConfig**

**Root level build.gradle** \>\>

```
allprojects {
     integTestCompile configurations.TestConfig
     //all other dependencies and configurations are applied to all sub-projects in integTestCompile
}

```

Now as part of my subproject - “my\_new\_sub\_project-rohan”, I want to exclude the entire module org.codehaus.jackson, but even after writing the below exclude statement, it is not getting excluded.

**my\_new\_sub\_project-rohan level build.gradle** \>\>

```
subprojects {
    configure ( subprojects.findAll {}) {
        afterEvaluate {
            configurations.all {
                exclude group: 'org.codehaus.jackson', module: 'jackson-core-asl'
                exclude group: 'org.codehaus.jackson', module: 'jackson-mapper-asl'
            }
        }
    }
}

```

But even then, this module is getting added to classpath. I checked by running  
`$> gradle dependencies`  
and this org.codehuas.jackson module still listed there.

Any inputs on something I am doing incorrectly or may be on how to achieve the exclusion ?

Thanks. Appreciate any inputs.
