Details
-
Type:
Improvement
-
Status:
Open
-
Resolution: Unresolved
-
Affects Version/s: 1.0-milestone-5
-
Fix Version/s: None
Description
The Eclipse task should warn the user when a web application module ("java", "war", "eclipse-wtp" plugins applied) relies on a module without wtp plugin applied ("java", "eclipse" plugins applied).
When a Java web application module A depends on a module B which doesn't have the eclipse-wtp plugin applied, the dependency will be added correctly in A but the necessary files wtp configuration files wont be created in module B. Both module A and B are created as valid eclipse projects, and module A will have a correct dependency on module B and all resources (classes, etc) will be shared correctly between the projects in eclipse. The deployment descriptor for module A in the WTP integration will however be invalid which means that module B will not correctly be deployed when using the WTP servlet container integration.
It may be fair to emit a warning when running the eclipse task that module A depends on a module that does not have the eclipse-wtp plugin applied (but has the eclipse plugin applied). It may also be fair to note in the documentation that the eclipse-wtp plugin is not only used for modules applying the "war" plugin, but should also be applied to modules that these modules depend on.
I've attached a simple example which illustrates the problem.
This is quite a devious problem... projects that have this problem look 'ok' in every way, yet they don't deploy properly. It would be quite hard for a user to determine what the problem is.
I've added my vote for this issue, i.e. I think it would be very good if there would be some kind of error/warning to explain to a user it isn't a good idea to have WTP projects depending on non-WTP projects.
Example of a problem caused by this issue that was reported as a bug against STS gradle tooling:
https://issuetracker.springsource.com/browse/STS-2192