On Mon, 7 May 2001, Ceki [iso-8859-1] G�lc� wrote:
> At 10:02 07.05.2001 -0700, you wrote:
> >On Mon, 7 May 2001, Ceki [iso-8859-1] G�lc� wrote:
> >
> >>
> >> I have asked this before but is there a need for an intermediary
> >> directory? For example, to take an example I am familiar with, Tomcat
> >> 4.x, a damn good project I might add, has a build/ directory and a
> >> dist/ directory where dist/ is a copy of build/. I do not know why
> >> Tomcat is doing this but it is. Other projects are doing similar
> >> things. I am obviously missing something...
> >>
> >
> >The two targets are *not* identical.
>
>
> >Tomcat developers want to do the minimum amount of work necessary to
> >create a runnable version of Tomcat -- thus, they execute the default
> >build.xml target ("deploy-main") that creates an executable Tomcat 4.0 in
> >the "build" directory. To speed things up, this dispenses with Javadoc
> >creation, JARing things up, and stuff like that.
> >
> >When you're ready to cut a release (or a nightly build), the "dist" target
> >is used, which creates a complete binary distribution. Obviously, large
> >parts of this can be copied from the "build" output (it would not make
> >sense to recompile everything, and so on) -- but there are also additional
> >steps. But this target is not used for daily development work.
> >
> >Bottom line -- having an intermediate build directory substantially
> >improves the turnaround time for me as a Tomcat developer.
>
> Hi Craig,
>
> Thanks for taking the time to clarify the Tomcat build process. If I
> understand you correctly, the reason behind having two target
> directories is to speed up the creation of a "work" version of
> Tomcat. Would it not be possible to have a "build" target that just
> creates compiled classes, a "jar" target to create jar files, a
> "javadoc" target to create javadocs and a "dist" target to create a
> complete distro? (The "dist" target would depend on "jar" and
> "javadoc" targets. The "jar" target would depend on "build".)
>
> Thus, it would be possible to have a working version by invoking the
> build target? Regards, Ceki
>
>
Inside the scripts, that is essentially what happens. To create a
runnable (for development) version of Tomcat 4.0 in a freshly checked out
repository, simply execute
./build.sh
in the top level directory. Then, set CATALINA_HOME to the "build"
directory path (for me, that means
/home/craigmcc/Jakarta/jakarta-tomcat-4.0/build), and start it up by
saying
$CATALINA_HOME/bin/startup.sh
(or the equivalent if you're using Windows).
The default target creates a "work" version in the "build" directory,
without going to any efforts that are not yet necessary. The "dist"
target assumes that the default target has been completed already (with a
"depends" rule) and does some extra stuff to create the binary
distribution -- which my nightly job does every night, and I do when I
create a release. Otherwise, I never run the "dist" target.
Tomcat is not just a JAR file when you get done with it -- you need a
series of files in a series of directories to create the executable
product. Therefore, in real life, the Tomcat build process is more
complex than this in its details, because there are independent build.xml
scripts for the major components (catalina, jasper, webapps) -- but they
all follow the same basic philosophy.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]