ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-ant buildAnt buildAnt.xml
Date Thu, 27 Apr 2000 20:26:10 GMT
craigmcc    00/04/27 13:26:10

  Added:       .        buildAnt buildAnt.xml
  Initial versions of a build script that will create nightly distribution
  files of Ant (and optionally install them on the Jakarta web server) that
  include the JAXP reference implementation JAR files ("jaxp.jar" and
  "parser.jar") that are redistributable.
  Prerequisites for the successful execution of this script are listed in
  the comments.  Because the script is intended to run from a "cron" job on
  the Jakarta server, no Windows version is provided.
  Revision  Changes    Path
  1.1                  jakarta-ant/buildAnt
  Index: buildAnt
  # -----------------------------------------------------------------------------
  # buildAnt -- Build Nightly Distribution Files for ANT
  # Goals:
  # - Create nightly distribution files of Ant, including the JAXP reference
  #   implementation JAR files (so no extra downloads are needed), in the usual
  #   formats
  # - Optionally, install these distribution files on the Jakarta web server
  # Prerequisites:
  # - The user under which this script runs must have done a CVS "login"
  #   for anonymous access to the Jakarta repositories
  # - Java Development Kit, version 1.2.2, installed and configured
  #   (avoids compiler problems in 1.1 and 1.3 related to XML classes)
  # - Ant 3.1 binary distribution installed
  # - ANT_HOME points at this distribution directory (you can set it
  #   in ~/.antrc)
  # - The "ant" script in $ANT_HOME/bin is accessible on your PATH
  # - Java API for XML Parsing (JAXP) 1.0 reference implementation installed
  # - JAXP_HOME points at this distribution directory (you can set it
  #   in ~/.antrc)
  # - The "buildAnt.xml" script (from the Ant source repository) is
  #   in the same directory that this script is.
  # - To execute the "install" target, you must be running on the Jakarta
  #   server, as part of group "jakarta".
  # Author:	Craig R. McClanahan
  # Version:	$Revision: 1.1 $ $Date: 2000/04/27 20:26:10 $
  # -----------------------------------------------------------------------------
  . ~/.antrc
  ant -buildfile buildAnt.xml -Djaxp.home=$JAXP_HOME "$@"
  1.1                  jakarta-ant/buildAnt.xml
  Index: buildAnt.xml
  <project name="Ant Nightly Distribution" default="all" basedir=".">
    <!-- Build Management Properties
      buildAnt.archive          Distribution directory to be archived
      buildAnt.cvsRoot          CVS login root for Ant
      buildAnt.dateStamp        YYYYMMDD date stamp (from executing script)
      buildAnt.dist             Distribution directory produced by "build" target             Base name of packaged distribution files
      buildAnt.package          CVS package name for Ant
      buildAnt.server           Jakarta server's nightly builds directory
      buildAnt.source           Directory into which Ant sources are extracted
      buildAnt.uploads	      Directory into which archives to upload are made
      jaxp.home                 Home directory of the JAXP distribution
    <property name="buildAnt.archive"      value="archive/jakarta-ant"/>
    <property name="buildAnt.cvsRoot"      value=""/>
    <property name="buildAnt.dist"         value="dist/ant"/>
    <property name=""         value="jakarta-ant"/>
    <property name="buildAnt.package"      value="jakarta-ant"/>
    <property name="buildAnt.server"       value="/www/"/>
    <property name="buildAnt.source"       value="jakarta-ant"/>
    <property name="buildAnt.uploads"      value="uploads/ant"/>
    <!-- Extract the most recent sources from the CVS repository -->
    <target name="extract">
      <deltree dir="${buildAnt.source}"/>
      <cvs cvsRoot="${buildAnt.cvsRoot}" package="${buildAnt.package}"
    <!-- Build the distribution according to its instructions -->
    <target name="build">
      <ant dir="${buildAnt.source}" target="clean"/>
      <ant dir="${buildAnt.source}" target="dist"/>
    <!-- Insert add-ons as required for the nightly distribution -->
    <target name="addons">
      <echo message="Copying addons from '${jaxp.home}' to '${buildAnt.dist}/lib'"/>
      <copyfile src="${jaxp.home}/jaxp.jar"
      <copyfile src="${jaxp.home}/parser.jar"
    <!-- Package up the distribution in various formats -->
    <target name="package">
      <!-- Recreate the archive directory -->
      <deltree dir="${buildAnt.archive}"/>
      <mkdir   dir="${buildAnt.archive}"/>
      <copydir src="${buildAnt.dist}" dest="${buildAnt.archive}"/>
      <!-- Recreate the uploads directory -->
      <deltree dir="${buildAnt.uploads}"/>
      <mkdir dir="${buildAnt.uploads}"/>
      <!-- Create the uploadable files in various formats -->
      <tar tarfile="${buildAnt.uploads}/${}-${DSTAMP}.tar"
      <gzip    src="${buildAnt.uploads}/${}-${DSTAMP}.tar"
      <exec    dir="${buildAnt.uploads}"
           command="compress ${}-${DSTAMP}.tar"/>
      <zip zipfile="${buildAnt.uploads}/${}-${DSTAMP}.zip"
    <!-- Install the distributable files to the Jakarta server -->
    <!-- Obviously, this will only work right on the real server!!! -->
    <target name="install">
      <copydir src="${buildAnt.uploads}" dest="${buildAnt.server}"
      <chmod   src="${buildAnt.server}/${}-${DSTAMP}.*"
      <chmod   src="${buildAnt.server}/${}-${DSTAMP}.*"
    <!-- All-in-one target (except for install) -->
    <target name="all" depends="extract,build,addons,package"/>

View raw message