As you defined the dependency, you applied the closure to filesinstead compile.
files('libs/poi-ooxml-schemas-3.12-20150511-a.jar'){
exclude group: 'stax', module: 'stax-api'
}
Instead, you should be sure to apply the closure to compiledirectly.
compile(files('libs/poi-ooxml-schemas-3.12-20150511-a.jar')){
exclude group: 'stax', module: 'stax-api'
}
But I doubt that this is necessary at all. Groups and modules are part of the Maven system, and the JAR file itself does not exclude this information.
source
share