Missing dependencies in war. Gradle build project

ぃ、小莉子 提交于 2020-01-17 12:02:14

问题


I've a war project build by gradle. And I've a string in gradle.build file: compile 'log4j:log4j:1.2.17' But thereis no any log4j.jar in resulting WEB-INF/lib directory in myproject.war file.

But all other libs defined in "compile" configuration are there. Why so strange behaviour, is it a bug or some kind of feature? And how to include it in my webarchive?

Eclipse shows log4j.jar in "web app libraries" part of the project. I'm using gradle v. 2.3 from Eclipse and console.


回答1:


have you applied eclipse-wtp. I think eclipse-wtp needs to be applied to all projects, including the root project if you have multiple projects.

My reference to the answer.




回答2:


There was a providedCompile 'anotherproject' dependency, which contains log4j, and blocks it in dependent module.



来源:https://stackoverflow.com/questions/30238040/missing-dependencies-in-war-gradle-build-project

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