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

Bug 299549

Summary: Need IArchive option to descriminate manifest peek for jars
Product: [WebTools] WTP Java EE Tools Reporter: Jason Peterson <jasonpet>
Component: jst.j2eeAssignee: Jason Peterson <jasonpet>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, jsholl
Version: 3.0.5Flags: jsholl: review+
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Jason Peterson CLA 2010-01-13 14:41:45 EST
A jar with no deployment descriptor, but happens to have a Main-Class entry in
the manifest should not be treated as an Application Client when added to an
EAR version previous to EE 5.  Treating this as an Application Client is an EE
5 specification assembly rule and should not apply for earlier EAR versions.

Need to create a IArchive option called DISCRIMINATE_MAIN_CLASS that
is used when adding a jar to an EAR.  The refineForJavaEE method in JavaEEArchiveUtilities should only attempt to peek at the manifest if DISCRIMINATE_MAIN_CLASS is set to null or true.
Comment 1 Jason Peterson CLA 2010-01-13 14:44:45 EST
This needs to target WTP 3.2.  The following bugzilla targets the maintenance releases.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=299059
Comment 2 Jason Peterson CLA 2010-01-13 17:01:44 EST
Created attachment 156056 [details]
patch
Comment 3 Jason Sholl CLA 2010-01-14 10:58:42 EST
code checked into head