Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314162 - Wrong Java Facet set during EE import
Summary: Wrong Java Facet set during EE import
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Server 2003
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Jason Sholl CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-24 16:41 EDT by Jason Sholl CLA
Modified: 2010-05-26 17:43 EDT (History)
1 user (show)

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


Attachments
patch (9.50 KB, patch)
2010-05-24 16:45 EDT, Jason Sholl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Sholl CLA 2010-05-24 16:41:11 EDT
The Java Facet is not always correct when importing EE artifacts.  There are two problems, the first is that the Java facet should be linked to the server; i.e. the highest Java version the targeted server supports should be used.  The second problem is that during headless import the opposite is not happening; i.e. Java 1.6 is always being used regardless of what the server supports.  This second problem is far more critical because the import fails with exceptions titled: org.eclipse.core.commands.ExecutionException: One or more constraints have not been satisfied.

This bug will fix both issues.  It has been tested using the UI both in WTP and in an adopter product targeting a variety of servers including 'none'.  Also the entire suite of WTP JUnits has been run against it.
Comment 1 Jason Sholl CLA 2010-05-24 16:45:06 EDT
Created attachment 169728 [details]
patch
Comment 2 Chuck Bridgham CLA 2010-05-26 13:50:31 EDT
approve
Comment 3 Jason Sholl CLA 2010-05-26 14:11:25 EDT
    * Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

In addition to the problems described in the first comment, this is breaking adopter code.

    * Is there a work-around? If so, why do you believe the work-around is insufficient? 

No

    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

UI and JUnit

    * Give a brief technical overview. Who has reviewed this fix? 

The java facets should be set based on the targeted runtime if one exists.

    * What is the risk associated with this fix? 

No.
Comment 4 Jason Sholl CLA 2010-05-26 17:43:54 EDT
code checked into head for wtp 3.2 rc3