Bug 139241

Summary: [j2ee properties] J2EE Module Dependencies, classpath containers and duplicate classpath entry
Product: [WebTools] WTP Java EE Tools Reporter: Dimitry E Voytenko <dvoytenko>
Component: jst.j2eeAssignee: Neeraj Agrawal <nagrawal>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: ekuleshov
Version: 1.0.1   
Target Milestone: 1.5 RC4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dimitry E Voytenko CLA 2006-04-28 13:13:20 EDT
Right now "J2EE Module Dependencies" project properties tab (for instance for "main" project) shows projects in the workspace. If a project is selected on this page (for instance "component" project) WTP will add it to the list of projects on the "Java Build Path > Projects" tab. If "component" project was already there - it's fine, WTP handles this situation fine. 

The problem is that projects added on the "Java Build Path > Projects" is not the only source of project dependencies. Any classpath container can add project dependency. 
In the example, if the project "component" were added via classpath container, selecting it on the "J2EE Module Dependencies" would fail with "duplicate classpath entry" b/c WTP tries to add this project to the "Java Build Path > Projects" thus creating the conflict.

The problem could be relatively easily avoided if WTP checked if the "main" project already had project dependency, whether explicitly or via any of the classpath containers before adding it to the "Java Build Path > Projects".
Comment 1 Neeraj Agrawal CLA 2006-05-25 12:55:25 EDT
The J2EE Module dependencies  is now handled using  containers, defect 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=142328 is opened to track the problem to avoid duplicate entries

*** This bug has been marked as a duplicate of 142328 ***
Comment 2 Eugene Kuleshov CLA 2006-08-30 17:18:46 EDT
Also see bug 154251
Comment 3 John Lanuti CLA 2006-11-28 15:59:24 EST
This is part of a mass update to close out all stale WTP resolved bugs from the 1.0.x and 1.5.0 timeframe.  If you feel this bug was closed inappropriately, please reopen.

Thanks, John Lanuti