How to exclude transitive dependency

*爱你&永不变心* 提交于 2021-01-28 12:16:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!