In a multi-project setup (in both Eclipse and Gradle), I have a web project and a ‘util’ project. The latter is depending on third-party libraries. Those libraries are resolved by Gradle from mavenCentral. On disk, it looks like this:
+--gradle | +--gradle.properties | +--settings.gradle | \--build.gradle | +--util | +--build.gradle | \--src | +-- ... | \--war +--build.gradle \--src +-- ...
Generating the WAR using Gradle works fine, but I’d like to deploy to an embedded JBoss server from within Eclipse. I’m applying the ‘eclipse-wtp’ plugin on the WAR project, but Gradle generates an incorrect ‘org.eclipse.wst.common.component’ file in the .settings folder. Two things seem incorrect: 1. The deploy path is missing the name of the project included:
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/util/util"> <dependency-type>uses</dependency-type> </dependent-module>
If I fix this in Eclipse, the deploy-path becoomes “/WEB-INF/lib/util” .
- All libraries required by the util library are missing in this file.
Does the eclipse-wtp plugin need any configuration for this? I was hoping it would work by merely adding ‘apply plugin:eclispe-wtp’ to war/build.gradle .