WTP support

The Eclipse plugin supports creating configurations for Eclipse WTP (Web Tools Project). Projects with a WAR packaging can be setup as WTP dynamic web projects and runtime dependencies are configured to be used when running them using Eclipse internal servers.

WTP versions

In order to create a configuration for WTP you have to specify the version of WTP you are using.

Note that R7/1.0 configuration files are totally different, so be sure to check the version you are using. WTP 1.5 configuration is slightly changed from 1.0 and WTP 1.5 can also use WTP 1.0 config files without problems.

In order to generate WTP configuration files simply run:

mvn -Dwtpversion=R7 eclipse:eclipse

Where wtpversion can be R7, 1.0, 1.5, 2.0 or none (default).

Note that in the 2.0 version of the plugin the default was R7 and WTP configuration was always generated. Now that different incompatible versions are out the default is to not to generate WTP configuration if the user doesn't specify the desired version.

WTP 1.0 warning

Unfortunately WTP 1.0 has been shipped with a bug which prevents external dependencies from working.

This means that only project-dependencies (in a multi-module build) will work, but any other dependency in the POM will be ignored when running the web application inside Eclipse.

This bug has been fixed in release 1.0.1, so if you are still using WTP 1.0 be sure to update it to the 1.0.1 (or newer) release.