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

Bug 325860

Summary: Regression: child projects not targeted to parent project's runtime
Product: [WebTools] WTP Common Tools Reporter: Carl Anderson <ccc>
Component: wst.commonAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: major    
Priority: P2 CC: jasonpet, stryker
Version: 3.2Flags: ccc: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 325991    
Attachments:
Description Flags
Set the children projects' runtime to be the parent project's runtime
none
Patch with optional property none

Description Carl Anderson CLA 2010-09-21 10:23:46 EDT
This is a regression caused by the rework for the Deployment Assembly page.

All the way up to WTP 3.1.2, if you add a reference to a child project to a project, the child project's targeted runtime is set to be the parent project's targeted runtime.  This is important, since the child project needs to be able to compile/run on the same server as the parent.

In WTP 3.2.x, AddComponentToEnterpriseApplicationOp still handles this for EAR projects. However, AddReferencesOp does not handle this for other child projects.
Comment 1 Carl Anderson CLA 2010-09-21 10:26:32 EDT
Created attachment 179316 [details]
Set the children projects' runtime to be the parent project's runtime
Comment 2 Carl Anderson CLA 2010-09-21 10:29:36 EDT
I would love to set all of the runtimes of the parent onto the child, but that would be quite an intensive check- we would have to ensure that there are no facet conflicts for each runtime.
Setting the runtime of each child to be the primary runtime of the parent brings us back to the level of support that we previously had.
Comment 3 Rob Stryker CLA 2010-09-23 23:18:08 EDT
For this patch at least, I would like to see this behaviour optional, perhaps set as a flag in the datamodel. I don't have a strong opinion on whether the default should be to execute this or not, but as long as the option is there, I'd feel a lot more comfortable that other webtools projects can prevent this behaviour if they want.
Comment 4 Carl Anderson CLA 2010-11-03 22:20:25 EDT
Created attachment 182347 [details]
Patch with optional property

As per Rob Stryker's desires, I added in an optional (but default to TRUE) flag to determine whether or not the child project's primary runtime should be set to the same as the parent project's primary runtime.
Comment 5 Carl Anderson CLA 2010-11-03 22:23:27 EDT
Committed to R3_2_maintenance for WTP 3.2.3
Comment 6 Carl Anderson CLA 2010-11-08 09:28:38 EST
Committed to HEAD for WTP 3.3