WTP refers to the
Web Tools Platform
project from the Eclipse Foundation which allows Eclipse users to easily develop, launch and debug web applications. Apache IvyDE works with WTP 2.0+ (Eclipse 3.3+). In the properties of your project configured to use WTP, there is a section titled "Java EE Module Dependencies". In this section you will find the IvyDE classpath container listed, usually with the name "ivy.xml [*]". Select it and dependencies found in the IvyDE classpath container will be deployed as well.
This has been successfully tested with Eclipse 3.3/WTP 2.0, and Eclipse 3.4/WTP 3.0.
IBM Rational Application Developer (RAD) 7.5.3+
Users of RAD 7.5.3 will notice that the classpath container is not listed in the table. RAD prevents the deployment of classpath containers by default. To allow this behavior, selection Windows > Preferences > Java EE. Check "Allow loose classpath module dependencies". RAD will present you with a warning message. To enable the behavior, you need to check the option again in the popup and click Yes.
Note:
due to a bug in RAD 7.5.3, this IBM specific property is not persisted when we close the workbench and reopen it. To work around this:
Export RSA preferences ( File > Export > General > Preferences)
Open the exported .epf file and replace /instance/org.eclipse.jst.j2ee/org.eclipse.jst.j2ee.preferences.allowClasspathDep=false with /instance/org.eclipse.jst.j2ee/org.eclipse.jst.j2ee.preferences.allowClasspathDep=true
Load the modified .epf
Resolve in workspace
WTP doesn't support classpath containers like IvyDE's or Maven's one which can link to a Java project in a workspace. A feature request has been opened in WTP's Bugzilla: see
bug #184125
. If you really want to link a Java project into the classpath of a WTP project, you should folow what is described in the
comment #12
and the
comment #17
:
in your ivy.xml of your WTP project, exclude from your dependencies the java projects you want to link to (you can create a specific Ivy configuration for that, so it won't mess with the configurations used by an Ant build for instance)
make sure your Java project is a WTP "utility" project
make sure any IvyDE classpath container in the Java projects has been added to the deployment assembly
in your WTP project, add the IvyDE container which resolve the dependencies excluded your Java project dependencies
in your WTP project, add your Java project dependencies to the WTP project using existing deployment assembly facilities