How to exclude specific jars from WEB-INF/lib

后端 未结 2 1381
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 04:05

I have the following gradle projects:

jar-module-A
  +-- JavaEE lib(Dependency)

war-module-A
  +-- jar-module-A

I want to exclude JavaEE l

2条回答
  •  鱼传尺愫
    2020-12-22 04:30

    If the transitive is not working, can try resolution startegy. I was fed up with the transitive or even normal exclude.

    https://docs.gradle.org/2.2.1/dsl/org.gradle.api.artifacts.ResolutionStrategy.html

    dependencies{
            compile(group: 'ruimo', name: 'module_a', version: '1.0-SNAPSHOT')
        }
    
    configurations.all {
        resolutionStrategy {
            force ruimo:module_a:1.0-SNAPSHOT
        }
    }
    

提交回复
热议问题