问题
I use JavaMail
in the same project with cxf. cxf brings an older version of JavaMail
which does not suit me. How to excluded?
I did so:
compile (group: 'org.apache.cxf', name: 'cxf-rt-bindings-soap', version: apacheCfxVersion) { exclude module: 'geronimo-javamail_1.4_spec' }
But it did not help. I find in the war WEB-INF \ lib \ geronimo-javamail_1.4_spec-1.6.jar
回答1:
Try this:
configurations {
all*.exclude module: 'geronimo-javamail_1.4_spec'
}
来源:https://stackoverflow.com/questions/17971023/how-to-exclude-transitive-dependency