we are happy to announce that the next Buildship release (1.0.21) will include Eclipse WTP support. Here’s how it will work:
When Buildship detects the eclipse-wtpplugin on a project, it will call the eclipseWtp task, which generates the necessary metadata, before importing the project. All you need to do is to apply that plugin to your projects and use Gradle >= 3.0
We have published a snapshot to our update site and would be very happy to get some feedback on it. We plan to release the new feature in late September/early October.
the 1.0.21 snapshots not available on the snapshot update site, I have to build it manually on my local
I have a multi-module gradle project, it’s follow the quite normal MVC module layout, saying rest -> service -> dao, the rest module is the web app, which depends on service module with compile project(':service'), service module in turn depends on dao with compile project(':dao'), but the problem is, neither dao, service jar (or classes) copied to .metadata/.plugins/org.eclipse.wst.server.core/tmpX/wtpwebapps, hence my app failed to start with error ClassNotFound
the rest 3rd party jars not consistent between .metadata/.plugins/org.eclipse.wst.server.core/tmpX/wtpwebapps and the ones generate by gradle war
that makes the trick, it works now, though it’s anti-intuitive to apply ‘eclipse-wtp’ plugin to dao and service project.
(I think it’s better to document somewhere so that others won’t be confused again, now I apply the plugin in allprojects)
one minor thing that I guess not a big deal, there is missing version number from the ‘dao’ and ‘service’ jar file name, while other third party jar all follow with version number:
-rw-r--r-- 1 nick staff 46K Sep 6 18:05 dao.jar
-rw-r--r-- 1 nick staff 82K Sep 1 01:35 disruptor-3.3.5.jar
-rw-r--r-- 1 nick staff 2.2M Jun 21 15:17 guava-18.0.jar
-rw-r--r-- 1 nick staff 16K Sep 6 18:05 service.jar
-rw-r--r-- 1 nick staff 40K Sep 1 00:30 slf4j-api-1.7.21.jar
I think this might be the issue of eclipse-wtp plugin, since the generated org.eclipse.wst.common.component does not specify the attr archiveName for dependent-module element:
Want to say thank you for this - wtp directly in eclipse with gradle has been such a pain in the past and today I just tried this with a multi-project gradle solution clean out of the box, imported and it simply just worked.