开发者

Eclipse problem: project references itself

开发者 https://www.devze.com 2022-12-14 20:45 出处:网络
I have small project consisting of one maven project and two maven modules. One of the modules is a webapp, and I\'m using WTP to run all my web applications. Everything has been fine, until today whe

I have small project consisting of one maven project and two maven modules. One of the modules is a webapp, and I'm using WTP to run all my web applications. Everything has been fine, until today when when the webapp started refusing to compile, citing:

Project 'sdx.client' cannot reference itself

If I remove the following line f开发者_运维技巧rom the .classpath:

<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>

my project compiles again. From googling, I believe this is a WTP element, but I'm not really sure what it does and why it believes that it contains a reflexive reference to the project containing it. Suggestions for where to look to track down the source of the problem would be very welcome.

Update

I haven't solved the problem, but I did make the symptoms go away by deleting the project and checking it out again from svn. So it looks like a bug somewhere, but I'm not sure where to report it or how to propose a decision procedure to determine when it's fixed.


I had the same problem and found a way to fix it via the .classpath file in my project: This entry was causing the problem:

<classpathentry kind="lib" path="C:/....jar">
    <attributes>
        <attribute name="javadoc_location" value="jar:file:/C:/....jar!/"/>
    </attributes>
</classpathentry>

Comparing with a previous version, it turned out the following line went missing, after the <attribute name=...> line. Adding it again made the problem go away:

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

Not sure how to explain it, but perhaps it helps somebody.


There is a discussion earlier this year in dev-eclipse: http://dev.eclipse.org/newslists/news.eclipse.webtools/msg18400.html which suggests this may be a bug.

0

精彩评论

暂无评论...
验证码 换一张
取 消