Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319639

Summary: Unwanted newlines before display name value
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P2 CC: david_williams
Version: 3.2Flags: david_williams: pmc_approved+
ccc: pmc_approved? (raghunathan.srinivasan)
ccc: pmc_approved? (naci.dai)
deboer: pmc_approved+
ccc: pmc_approved? (neil.hauge)
ccc: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Bug Depends on:    
Bug Blocks: 319735    
Attachments:
Description Flags
Remove the new line after <display-name> none

Description Carl Anderson CLA 2010-07-12 17:33:03 EDT
An adopter product has run into problems where the display name formatting can cause issues with other tools.  As an example, today an EAR 5.0 named Ear50 would be created with:

<display-name>
Ear50</display-name>

Instead, we should have:

<display-name>Ear50</display-name>

Note that this was previously fixed for older J2EE versions- see bug 271837.  This fixes up Java EE 5 and 6 default content.
Comment 1 Carl Anderson CLA 2010-07-12 17:34:29 EDT
Created attachment 174104 [details]
Remove the new line after <display-name>
Comment 2 Chuck Bridgham CLA 2010-07-13 14:14:21 EDT
approved
Comment 3 Carl Anderson CLA 2010-07-13 14:33:01 EDT
This bug causes both ugliness in the deployment descriptor as well as problems with other (non Eclipse) tooling that works with Java EE projects and parses their deployment descriptors.
The workaround is to manually fix up each deployment descriptor. 
The JUnit bucket has been run against this fix, and it has been tested by hand.
Simply put, for EAR, App Client, and EJB projects, the /n after the <display-name> in the deployment descriptor string has been removed.  Other project types are not affected because they insert the display name in a different method.  Chuck Bridgham has reviewed this fix.
This is an extremely low risk fix.
Comment 4 Carl Anderson CLA 2010-07-14 09:38:27 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3