Bug 353916 - WTP plugin incompatability with m2e-wtp
Summary: WTP plugin incompatability with m2e-wtp
Status: RESOLVED WORKSFORME
Alias: None
Product: Jetty
Classification: RT
Component: wtp (show other bugs)
Version: 8.0.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P5 normal (vote)
Target Milestone: 7.5.x   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2011-08-04 12:06 EDT by Samuel Vogel CLA
Modified: 2016-01-11 11:04 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Vogel CLA 2011-08-04 12:06:22 EDT
There is an incompatability between the Jetty WTP Adaptor (1.0.0.201108021218) and m2e-wtp (0.14.0.201107041637). If you choose a project name template for Maven, your eclipse project name might differ from the name of the actual war file.

Example:
1. Create a Maven project which uses the name template '[GroupId].[ArtifactId]' with GroupId 'com.company' and ArtifactId 'product'. You will get a project named 'com.company.product'.
2. The compiled project will be located at '.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/' as 'com.company.product'.
3. The Jetty WTP Adapter will write the following to '.metadata/.plugins/org.eclipse.wst.server.core/tmp1/contexts/product.xml':

  <Set name="contextPath">/product</Set>
  <Set name="war"><SystemProperty default="." name="jetty.home"/>/wtpwebapps/product</Set>

Problem:
This will lead to FileNotFoundExceptions as the webapp can not be located at '/wtpwebapps/product' but instead at '/wtpwebapps/com.company.product'.

Fix:
The actual project name needs to be used for the webapp path in the context file.
Comment 1 Joakim Erdfelt CLA 2011-09-20 13:38:44 EDT
Dropping priority
Comment 2 Samuel Vogel CLA 2011-09-20 13:40:34 EDT
Think this should be a blocker, since m2e is a first class Eclipse project from 3.7 on and this is a clear incompatibility.
Comment 3 Jesse McConnell CLA 2011-09-20 13:55:02 EDT
well to be honest we are considering just dropping this jetty wtp plugin as we get very little interest or feedback on it and webby seems to be picking up steam and works much smoother then wtp from what I have seen

we added this from a contribution some time ago and may just retire it unless we suddenly start hearing interest in wtp support, personally I don't know anyone that uses wtp

https://docs.sonatype.org/display/M2ECLIPSE/Integration+with+Maven+WAR+Plugin

so it is certainly low priority for me, but anything with a patch becomes high priority so take that as you will :)

cheers
Comment 4 Ben Galaviz CLA 2014-03-14 12:26:43 EDT
I have tested this issue with a build I have forked to github. I could not replicate it.
Comment 5 Joakim Erdfelt CLA 2016-01-11 11:04:06 EST
Resolving as "WORKSFORME" per Ben's comment.