tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: [tomcat-4.0] building is hard
Date Thu, 14 Dec 2000 18:26:25 GMT
Punky Tse wrote:

> Hi,
>     Craig and Pier: Let's fix it!   We have a beautiful build tool (Ant) ,
> why can't we have a good build system?
>

Agreed.

One of the reasons Tomcat 4 is complex is actually Jon's fault :-).  He wanted a
way to build just the servlet container portion (Catalina), which is implemented
by having subordinate build scripts in the major subdirectories.  Getting Ant to
play nice in a hierarchical build structure is not as pleasant as it could be,
but Ant 1.2 makes it a *lot* better than it used to be.

Jon is also putting his developer skills where his mouth is.  He's working on
some proposed improvements to the build scripts.  I asked him to hold off
changing anything until after the milestone was cut, so we'd have time to work
out the kinks before the next release.

>
>     My build scripts for 3.2 and 3.3 runs great.  So, I try to write build
> script for TC4.  But I failed.  Like Jon, I found that it is too hard to
> build.
>
>     Still, I haven't try Tomcat 4.0.  Although I can download snapshot or
> milestone build, I like "do it myself"! ;-)
>

So do I.  In fact, the Tomcat 4 build process, IMHO, should keep all of the
following goals in mind (with my "I'm interested in helping develop Tomcat 4"
had on):

* Reasonably easy for a *developer* to set up and operate.
  I'm not particularly interested in whether Java newbies can
  do this successfully -- they should be starting with smaller
  scale projects anyway.  To me, this is a practicality test --
  "don't make anything gratuitously harder than it needs to be,
  but don't obsess about handholding either."

  A process that can be totally scripted is more important
  than a process that is simple enough for newbies to grok
  the first time they try it.

* Developers have their own preferences for packages, and
  versions of packages, that they often have already installed
  in their environments.  The most common examples are
  Ant and JAXP parsers, but the concept applies to every
  external project that Tomcat 4 depends on (and there are
  getting to be quite a few).  If your build script forces me
  to use particular versions -- especially if they are not compatible
  with my usual tools -- I'm not going to like it.

* One approach that has been suggested, and widely debated
  (see the archives of ANT-DEV over the last few weeks for
  a recent case :-) is checking copies of the JAR files you depend
  on into the Tomcat CVS repository.  I, and others, have seen
  this sort of thing backfire on projects over the long term, and
  it often leads to problems on the previous goal.

  An approach I like, and one that's starting to be talked about,
  is creating a "CJAN" (takeoff on the "CPAN" repository of
  PERL packges) where you can register your interest in particular
  versions of the JAR files from particular projects -- and then
  automate grabbing the dependencies in your build script.
  Right now, this idea is in early stages (it's another of Jon's
  proposals), but shows a lot of promise IMHO.

* The Tomcat 4 build scripts need to be able to create a
  binary distribution (the "./build.sh dist" target of the top level
  script) that packages all the JAR files we depend on that can
  be legally distributed.  (NOTE 1 - that means pretty much
  everything other than JSSE.  NOTE 2 - unlike some people's
  "package everything and to heck with license restrictions"
  philosophy :-), I'm going to -1 any approach that violates
  redistribution terms for *any* module we depend on).

The last requirement, in particular, means that it is not good enough for the
build scripts to set up the compiler class path for the person doing the build
of Tomcat.  The scripts also have to know where to copy JAR files from, in order
to include them in the binary distro.

Within the range of these goals, I'm entirely open to innovation and improvement
in the Tomcat 4 build process.  Let the fixing begin!!!

>
>     I hope to see that it can be built by myself very soon!
>
> Punky
>

Craig McClanahan



Mime
View raw message