Eclipse classpath still include the jar files that are excluded in the build.gradle file

Hello

I’m trying to exclude few jars from the .classpath file which is generated by the gradle eclipse plugin. Though i do the following stuff in my build.gradle to exclude these jars, the classpath still contains these jar files.

configurations {
eclipseExcludedDeps
}

dependencies {
    eclipseExcludedDeps group: "javax", name:"javaee-api", version: "${versions.javaee_api}"
    eclipseExcludedDeps group: "javax.xml.parsers", name:"jaxp-api", version: "${versions.jaxp_api}"
    eclipseExcludedDeps group: "xerces", name:"xmlParserAPIs", version: "${versions.xmlParserAPIs}"
}

eclipse {
    
    wtp {
        component {
            minusConfigurations << configurations.eclipseExcludedDeps
        }
    }
}

I have tried all the approaches mentioned in the gradle docs but none of the them works for me. Can someone please help me on this.

Thanks
Hemanth

More info on this, i’m using gradle version 2.7. To create the classpath i run ‘gradle eclipse’ command.