On Monday, 9 בJanuary 2006 20:02, Boris Unckel wrote:
> > The way I see it, I have two options - either put all the 3rd party
> > libraries back in the JVM classpath, or build jars from my locally
> > developed libraries and copy them by hand to the web applications'
> > folder. I don't like either option, and I would really like a third
> > one - something like configuring the default web.xml file to add
> > external directories to the web-app class loader ? can something
> > like that be done ?
>
> I do not fully understand your problem, but maybe something simple:
> WEB-INF/lib for your jars
> WEB-INF/classes for your classes

The problem is like this (the actual system is far more complex):
- suppose two web applications, app1 and app2, both use some API (which 
I developed myself). 
- I don't want to develop the API twice on both web applications, so I 
have a third project for the API  itself, which is a not a web 
application and so isn't in WEB-INF/classes of neither app1 nor app2.
- I don't want to build a jar for that API library to put in app1 and 
app2's WEB-INF/lib because its also constantly being developed - if I 
wanted to do this then after each commit, in addition to the build 
stage I would have to copy the jar by hand to all the applications that 
use it, which is an error prone process.
- so instead I add the directory where the API's class files are built 
to the tomcat's startup classpath. 
- But then, if the API library calls a 3rd party library, that library 
can't be put in WEB-INF/lib either - it has to be put in the tomcat's 
startup classpath as well. 

Now imagine about 20 such locally developed API libraries (not all used 
in all web applications, but a lot of web applications use more then 
one such library), with inter-dependencies between themselves and 
dependencies on more then 50 3rd party libraries - the situation gets 
way out of hand very quickly.
Before I put a stop to the madness, the tomcat startup classpath was 
taking about 15 rows of text in my console.

-- 
Oded

::..
The point of philosophy is to start with something so simple as not to 
seem worth stating, and to end with something so paradoxical that no 
one will believe it. 
        -- Bertrand Russell, The Philosophy of Logical Atomism 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to