tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <>
Subject [PROPOSAL] building is easy (was: Re: [tomcat-4.0] building is hard)
Date Thu, 14 Dec 2000 18:09:02 GMT
Hi All,

I spent a few hours last night mucking with the build process and found out
that the main problem primarily stems from the fact that the Ant build
scripts are not written to take advantage of Ant 1.2's new features with
regards to setting up the classpath.

The issue is that it currently isn't trivial to setup a system within Tomcat
that uses relative paths to find the correct .jar files because Tomcat needs
to have the ability to be built on a per-product level (there are several
products within Catalina, Jasper and Webapps) as well as on a
global level from the top level build file which simply makes calls to the
lower level build files. In other words, you don't ever know if you are
going to be relative one directory down or if you are going to be relative
two directories down.

I spent a ton of time last night rewriting the script to attempt to
deal with this more cleanly only to find out that it really isn't possible
to do it easily that way. UG!

So, what I propose is to replace the use of environment variables with the
use of properties files that define the path to the .jar files. Therefore,
you will have a system that first tries to look for relative paths to the
jar files in property files sitting in your home directory and then if those
files don't exist, attempt to use the default ones in Tomcat.


First look for absolute paths to the jar files in these files:

If the above files do not exist, then attempt to look for relative paths
(ie: ../../jakarta-servletapi) to the .jar files here:


Ant will then dynamically build up the classpath and compile things using
that methodology instead of passing environment variables around.

By doing things this way, it will make it transparent for people who setup
their directory structure in a defined way and if they want to use their own
directory structure, then they can simply define their own .properties files
giving the same level of control that is currently in the build system.

I wouldn't be adverse to putting it into a a single .properties file either.
I'm just doing it this way in the example for clarity.

Lastly, the idea of putting the .jar files into CVS is a major favorite of
mine. Especially given that Sun stupidly thinks that it can't export the
JMX.jar files to Berkeley, CA (where I live), but the issue with that is
that the .jar files that Tomcat depends on are under license agreements from
Sun to not be distributed. Therefore, we can't put them into CVS legally.
Maybe one day the execs at Sun will wake up and get a clue and realize that
they should just make these things easily downloadable because they are
hurting their customer base instead of helping and override whatever the
silly legal department of Sun thinks.



View raw message