Community
Participate
Working Groups
Build Identifier: 20110301-1815 When a Dynamic Web Module embeds a java project via Deployment Assembly, an attempt to have the latter refer to the Web App Libraries of the first via Java Build Path, would result in a "Project 'x' cannot reference itself" (where 'x' is the java project name). It is common to put, into a WebApp's WEB-INF/lib directory, libraries which end using the same Web environment of the WebApp. Modules using some jsp/jsf feature, in example, are generally put there and they expect to share the same classpath of the web application itself. The intention of referring to the Web App Libraries from 'lib' is not to reference the 'lib' module itself, but instead to share the war classpath. So, the "Project 'lib' cannot reference itself" error isn't due (at least) in this context, because 'lib' is going to share a common classpath, in which incidentally itself must be present. Reproducible: Always Steps to Reproduce: 1. File->New->Project->Dynamic Web Project; say Project name is 'web'. 2. File->New->Project->Java->Java Project; say Project name is 'lib'. 3. In the Deployment Assembly panel from project 'web', Add->Project->lib 4. In Java Build Path from project 'lib', Libraries->Add Library->Web App Libraries->'web'
Giampaolo, judging by the date, I assume that this is from Helios SR2? (Eclipse 3.6.2) If that is correct, then this corresponds to WTP 3.2.3
Right.
Assigning to Chuck for initial investigation.
This would be a major change to allow cyclical dependencies in this form. I understand the need to share web libraries on the classpath, but this scenario breaks JDT classpath rules, and another solution that may include exclusion rules needs to be investigated.
From what you write I see it isn't that easy to fix this. I'm not willing to argue in any way with your decision, but I would like to outline the fact that this problem had been introduced with recent versions of eclipse. Galileo, in example, did show the correct behaviour about this case. So, I wouldn't rate this bug as an "enhancement": it is at least a backward-compatibility issue.