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

Bug 311993

Summary: Adding the "Pull in classpath elements..." reference to a web project causes the project not to build
Product: [WebTools] WTP Java EE Tools Reporter: Larry Isaacs <larryisaacs>
Component: jst.j2eeAssignee: Jason Sholl <jsholl>
Status: RESOLVED DUPLICATE QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P3 CC: ccc, jasonpet
Version: 3.2   
Target Milestone: 3.2 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Larry Isaacs CLA 2010-05-06 20:58:59 EDT
If you create a dynamic web project and a utility project, then add an external jar to the Java build path of the utility project, you can use the Deployment Assembly page to mark the external jar for "publish/export" by clicking Add and using the "Referenced Projects Classpath Entries" in the New Reference Wizard.  After marking the external jar with a check and clicking Finish, the "Pull in classpath elements from referenced projects" reference gets added to the dynamic web project.  This reference causes a build path cycle which prevents the project from building.

The problem is that J2EEComponentClasspathContainer.update() is adding the referenced component from the "Pull in classpath elements..." reference to the web project's classpath, which is the web project itself, creating the cycle.  I'm not sure what mechanism is appropriate so J2EEComponentClasspathContainer will ignore this "special" reference.
Comment 1 Larry Isaacs CLA 2010-05-06 21:53:24 EDT
It appears this bug may be a duplicate of Bug 311981.  The "Pull in classpath elements..." reference has a dependency type of "consumes" so the changes to J2EEComponentClasspathContainer found in the patch for Bug 311981 fixes this bug as well.  Since this use case might have additional issues to consider, I'll leave it to others to officially declare it to be a duplicate.
Comment 2 Carl Anderson CLA 2010-05-10 09:18:01 EDT
Assigning to Jason Sholl for initial investigation (and duplication, if appropriate.)
Comment 3 Jason Sholl CLA 2010-05-10 09:58:43 EDT
Yes, this is a duplicate of bug 311981.

*** This bug has been marked as a duplicate of bug 311981 ***