Project 'x' cannot reference itself [message #229425] |
Mon, 23 March 2009 19:44 |
Chris West (Faux) 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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03470 seconds