Eclipse dependent projects not copied to WTP deployment

筅森魡賤 提交于 2019-12-08 16:05:39

问题


Before we started using Gradle, a multi-project (10-12) development effort within Eclipse successfully deployed, via a WTP project, to one of the internal Tomcat 7 servers. We find this very useful for development.

With Gradle up and running the dependent project's jar files are no longer being copied to the ../WEB-INF/lib directory. I don't believe this has anything to do with gradle as it is completely out of the picture later on, but it is different, so I am mentioning it. Building the standalone war file works perfectly as does "gradle jettyRun".

If I add the project facet "Utility Module" to the dependent projects within Eclipse then it works. However, I don't recall that this was ever done initially. Ok, this also really complicates the generation of the eclipse projects from gradle as well!

I can live with it, but was wondering if anyone knew if it has to be this way or if there is some alternative.

Thanks - versions: eclipse Indigo SR2, Java 1.7, Gradle 1.2


回答1:


I've run into this problem as well: An Eclipse WTP project that depends on other projects won't deploy those projects' dependencies unless they are WTP projects as well.

This is far from an ideal solution, but in my own build scripts, I work around this by using the eclipse-wtp plugin instead of the eclipse plugin:

allprojects {
    apply plugin: 'eclipse-wtp'
}

There are a couple of bugs related to this: GRADLE-1880 and STS-2192.



来源:https://stackoverflow.com/questions/12493763/eclipse-dependent-projects-not-copied-to-wtp-deployment

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