Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse dependent projects not copied to WTP deployment

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

like image 286
JoeG Avatar asked Sep 19 '12 11:09

JoeG


1 Answers

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.

like image 99
Brant Bobby Avatar answered Nov 06 '22 22:11

Brant Bobby