Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312176 - Ear Module Assembly overrides/prevents custom file extensions of utility projects
Summary: Ear Module Assembly overrides/prevents custom file extensions of utility proj...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Rob Stryker CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-09 05:18 EDT by Fred Bricon CLA
Modified: 2010-05-13 23:13 EDT (History)
3 users (show)

See Also:
stryker: pmc_approved? (david_williams)
stryker: pmc_approved? (raghunathan.srinivasan)
stryker: pmc_approved? (naci.dai)
stryker: pmc_approved? (deboer)
neil.hauge: pmc_approved+
stryker: pmc_approved? (kaloyan)
cbridgha: review+


Attachments
Test projects (4.60 KB, application/x-zip)
2010-05-09 05:30 EDT, Fred Bricon CLA
no flags Details
Adds the uri map (1.22 KB, patch)
2010-05-11 21:04 EDT, Rob Stryker CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2010-05-09 05:18:30 EDT
Build Identifier: 20100506-2000

Hi, 

A little piece of background first : I'm trying to handle non standard Java (EE) projects with m2eclipse, starting with JBoss SAR projects (https://issues.sonatype.org/browse/MNGECLIPSE-1984). A SAR project is basically a utility project with a sar extension, and can embed jars in a lib folder.
Since it didn't work the first time and it's JBoss related, I opened a bug in JBoss Tools (https://jira.jboss.org/jira/browse/JBIDE-5691) : variable based dependencies were not exported to lib. 
Turns out that was due to a WTP bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=298735, which was solved by Rob Stryker before Helios M7.

The test project I provided for JBIDE-5691 actually works as is : the sar project is now correctly exported with its dependencies in lib.

Here comes the bug (at last): when manually changing the deployed name of the sarproject in the Ear Module Assembly page, the .sar extension is changed to .jar. I assume there's a strict sanity check in that page that prevents the use of custom extensions (.har, .par, .wsr, ...)  
Worst thing is, after the extension has been changed to .jar, dependencies are no longer exported to lib
 
So, could you 
- turn off the check for jar extension in the Ear Module Assembly page
- explain why utility projects export behave differently whether their extension is jar or something else.
 

Reproducible: Always
Comment 1 Fred Bricon CLA 2010-05-09 05:30:46 EDT
Created attachment 167620 [details]
Test projects

1- Import the attached test projects to your workspace. The sarproject depends on the JUNIT_HOME\junit.jar which is supposed to be exported to lib.
2 - Export earproject, open earproject.ear, it contains sarproject.sar which in turn contains /lib/junit.jar as expected
3 - in the ear module assembly page, rename sarproject.sar to sar.sar and close the window
4 - reopen that same page to see the module's name is now sarproject.jar (no warning popped up to tell you there was something wrong)
Comment 2 Fred Bricon CLA 2010-05-09 05:32:43 EDT
> Worst thing is, after the extension has been changed to .jar, dependencies are
> no longer exported to lib
Scratch that, I double checked and the jar contains the expected /lib with its jar
Comment 3 Carl Anderson CLA 2010-05-10 09:23:03 EDT
Assigning to Rob for initial investigation.
Comment 4 Rob Stryker CLA 2010-05-11 21:04:32 EDT
Created attachment 168068 [details]
Adds the uri map 

Reproducible: patch is to fix the new ear-specific reference operation which was missing one line.
Comment 5 Rob Stryker CLA 2010-05-11 21:05:18 EDT
seeking approvals.
Comment 6 Chuck Bridgham CLA 2010-05-12 10:45:17 EDT
approved
Comment 7 Rob Stryker CLA 2010-05-12 11:18:44 EDT
Needs PMC
Comment 8 Rob Stryker CLA 2010-05-12 12:10:04 EDT
Forgot whiteboard flag
Comment 9 Neil Hauge CLA 2010-05-12 12:41:26 EDT
Approved assuming this is as low risk as it appears.
Comment 10 Rob Stryker CLA 2010-05-12 12:44:13 EDT
Committed to RC1