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