Affects Version/s: 0.9
Fix Version/s: 1.0-milestone-1
Gradle's support for generating Eclipse project files does not cover all cases for WTP (Web Tools Platform).
- All Java projects which a Dynamic Web Project depends must be configured as with the WTP Utility facet. This includes
- Adding the jst.utility facet to the org.eclipse.wst.common.project.facet.core.xml file.
- Adding the following natures to the .project file: org.eclipse.wst.common.project.facet.core.nature, org.eclipse.jem.workbench.JavaEMFNature, org.eclipse.wst.common.modulecore.ModuleCoreNature.
- Adding the following builders to the .project file: org.eclipse.wst.common.project.facet.core.builder, org.eclipse.wst.validation.validationbuilder.
- An org.eclipse.wst.common.component file must be added
- Each 1st level JAR dependency of each Utility project must be flagged as a runtime dependency. This is accomplished by adding the org.eclipse.jst.component.dependency attribute to the appropriate classpathentry in the .classpath file.
- Each project dependency (both 1st level and transitive) of a Dynamic Web Project must be adding as a runtime dependency. This is accomplished by adding an entry to the org.eclipse.wst.common.component file in the web project.
I have attached a very simple multi-module project which demonstrates the proper Eclipse files. The sample project contains the TestWeb Dynamic Web project which depends directly on the TestModuleA Utility project. The TestModuleA Utility project depends on the TestModuleB Utility project. Both TestModuleA and TestModuleB each have one JAR dependency. The result of deploying or exporting the WAR file from Eclipse should result in the following contents: