Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Project 'x' cannot reference itself
Project 'x' cannot reference itself [message #229425] Mon, 23 March 2009 19:44 Go to next message
Chris West (Faux) is currently offline Chris West (Faux)Friend
Messages: 1
Registered: July 2009
Junior Member
Short version: I have my projects set-up as described below, and I don't
see why the circular dependency can't be allowed. Why?

http://faux.uwcs.co.uk/wst-circular-projs.zip

Three projects: "fooweb" (a servlet), "fooapp" (a normal java application,
say, another process that will be running on the same machine as the
servlet container) and "foolib" (a project to contain all the common code
between the two).

For historical reasons, all of the libraries required by the foolib and
fooapp are also required by the fooweb, so they're only stored in the
WEB-INF/lib folder.

The way I think this should work is:

1) fooapp has project:foolib on the build path.
2) fooweb has a jee-module-dependency on foolib.
3) foolib has a "Add Library.. Web App Libraries.. foolib" on the build
path.

This should allow fooapp and fooweb access to the WEB-INF/libs and foolib,
and foolib should build as it has the WEB-INF/libs available.

The problem is, Eclipse won't allow the 3rd link to be created as "Project
'foolib' cannot reference itself"; assumably because this would be a
cyclic dependency (fooweb depends on foolib, foolib depends on fooweb('s
libraries, but not code)).

Is there a decent reason why this couldn't be allowed? It seems like a
reasonable situation to me, especially given that the current work around
is just to manually Add Jars... all of the WEB-INF/lib jars to foolib.

Thanks,
Chris.
Re: Project 'x' cannot reference itself [message #229517 is a reply to message #229425] Wed, 25 March 2009 11:15 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 962
Registered: July 2009
Senior Member
Chris,

This looks like a bug. The Web App Libraries container computes that
foolib is one of fooweb's web app libraries, but doesn't check that it is
being added to foolib project (and that therefore it should exclude foolib
from its set of libraries). If you could you open a bug with the details
that you provided here, I will follow up with you there.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Ja va%20EE%20Tools

- Konstantin
Re: Project 'x' cannot reference itself [message #230105 is a reply to message #229517] Mon, 06 April 2009 20:37 Go to previous message
none is currently offline noneFriend
Messages: 1
Registered: July 2009
Junior Member
Is there already a solution for that?

Thanks a lot!
Previous Topic:Simplistic XML Text Editor
Next Topic:XML Manipulation API within WST
Goto Forum:
  


Current Time: Tue Dec 23 00:09:12 GMT 2014

Powered by FUDForum. Page generated in 0.02823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software