Bug 372683 - Always separate the Java Output Folder from the Java Source Folder
Summary: Always separate the Java Output Folder from the Java Source Folder
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC
Keywords:
Depends on: 287164
Blocks: 373663 373136
  Show dependency tree
 
Reported: 2012-02-27 15:48 EST by Carl Anderson CLA
Modified: 2012-03-08 11:22 EST (History)
3 users (show)

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


Attachments
Use the default output directory in those cases (2.07 KB, patch)
2012-02-28 08:53 EST, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2012-02-27 15:48:31 EST
As can be shown by bug 363863 , configurations which have been supported by WTP up until now - the allowance of the creation of various projects with the default source folder being mapped to the default output folder - will be marked as an error by JDT validation.

To more fully support the JDT and its changes, we need to remove our automated support for merging the source and output folders for EJBs (and thus EJB Clients), JCAs, AppClients, and Utility projects.

This impacts org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaeePreferencesInitializer
Comment 1 Carl Anderson CLA 2012-02-28 08:53:57 EST
Created attachment 211727 [details]
Use the default output directory in those cases

This does not change default behavior.  However, if an adopter was relying on checks for ProductManager.shouldUseSingleRootStructure() to synchronize the source and output directories, they will no longer be in sync.
Comment 2 Carl Anderson CLA 2012-02-28 09:22:01 EST
I ran the Java EE JUnit bucket against this patch.  As expected, no test cases were effected.
Comment 3 Chuck Bridgham CLA 2012-02-29 08:00:11 EST
looks good
Comment 4 Carl Anderson CLA 2012-02-29 09:27:00 EST
PMC Review requested due to API change (behavior for adopters)

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.
With Eclipse 3.8/4.2, due to the fix in bug 287164, if an adopter sets the ProductManager.shouldUseSingleRootStructure() preference, many of the project types that are created will show an error right after creation when the defaults are used.

Is there a work-around? If so, why do you believe the work-around is insufficient? 
There is no workaround.

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
The Java EE JUnit bucket has been run against this change.  The fix has been tested by hand both in WTP and in an adopter product that sets this flag.

Give a brief technical overview. Who has reviewed this fix? 
Chuck Bridgham and Roberto Sanchez have reviewed this fix.  The fix is to remove the check of the ProductManager.shouldUseSingleRootStructure() flag for those types, thus defaulting to build/classes as the java output folder.

What is the risk associated with this fix? 
Medium-low... regular WTP users should be unaffected.  Our concern is for adopters other than IBM that might be setting the ProductManager.shouldUseSingleRootStructure() flag.
Comment 5 Chuck Bridgham CLA 2012-03-01 11:12:05 EST
I'm voting for this one, because this should only affect adopters using the "singleRoot" preference  (IBM) - and has no effect by default.

Also important because of JDT recommended best practice
Comment 6 Carl Anderson CLA 2012-03-02 15:01:16 EST
Committed to HEAD for WTP 3.4.0 M6