Reputation: 21
I have a gradle multiple projects like this:
root
--core
--web
When I include these projects in my eclipse, the war project hasn't jars of core in the classpath, so I can't deploy my war in a server.
If I deploy the generated war from web/build/libs to my tomcat server, all works fine.
But if I deploy from eclipse the I get class not found error for the class from core project.
build.gradle from web:
apply plugin: 'eclipse-wtp'
apply plugin: 'war'
dependencies {
compile project(':core')
//runtime project(':core')
providedCompile 'javax.servlet:servlet-api:2.5'
}
Thanks for the help.
Upvotes: 2
Views: 1356
Reputation: 8866
I had the same problem. The solution is to include
apply plugin: 'eclipse-wtp'
not just in web, but in every sub-project.
Upvotes: 3