Provided dependencies using Gradle (JetGradle) and Intellij Idea 13

前端 未结 3 1948
死守一世寂寞
死守一世寂寞 2021-02-14 02:12

I have a multiproject build with multiple war modules that depends on one jar module.

Both war and jar modules have dependencies over libraries like Spring, Hibernate an

3条回答
  •  醉梦人生
    2021-02-14 02:34

    Adding to the answer from Adrijardi, for Gadle 2.0 + not only did I have to change

    scopes.PROVIDED.plus += configurations.provided
    

    to

    scopes.PROVIDED.plus += [configurations.provided]
    

    I also had to change

    provided project(":module-name") {
        transitive = false
    }
    

    to

    provided (project(":module-name")) {
        transitive = false
    }
    

    Note the extra set of brackets on the second code sample

提交回复
热议问题