tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@hyperreal.org
Subject cvs commit: jakarta-tools/ant/src/bin ant
Date Wed, 01 Dec 1999 05:37:33 GMT
costin      99/11/30 21:37:33

  Modified:    ant      build.xml
  Added:       ant/src/bin ant
  Log:
  - added a generic script to run ant.
    Assuming you install ant somewhere on your system, you can
  do a ln -s .../ant/bin/ant ~/bin and use "ant" command instead
  of build.sh ( like you use make :-)
  
  - added "dist" target to create an ant "package" ( with bin, lib, doc :-),
  and "package" to create a distribution ( a zip file in ftp dir )
  (same is in work for tomcat)
  
  A bat file is needed...
  
  Revision  Changes    Path
  1.4       +27 -1     jakarta-tools/ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	1999/11/23 08:27:23	1.3
  +++ build.xml	1999/12/01 05:37:31	1.4
  @@ -1,10 +1,12 @@
   <!-- basedir attrib of project is optional -->
   
   <project name="BuildTool" default="main" basedir=".">
  +  <property name="dist.dir" value="${user.home}/opt" />
  +  <property name="package.dir" value="/home/ftp/pub/tomcat" />
   
     <!-- system properties can be defined here, compiler can have the values:
          classic, modern, jikes -->
  -
  +  <property name="ant.dir" value="${dist.dir}/ant" />
     <property name="build.compiler" value="classic"/>
   
     <!-- need to define the default taskdefs elsewhere -->
  @@ -19,6 +21,30 @@
       <!-- need to make a way for a jar to include other jar files -->
       <jar jarfile="../ant.jar" basedir="build" items="org"
        manifest="src/etc/manifest"/>
  +  </target>
  +
  +  <target name="dist" depends="main">
  +     <mkdir dir="${ant.dir}" />
  +     <mkdir dir="${ant.dir}/lib" />
  +     <mkdir dir="${ant.dir}/bin" />
  +     <mkdir dir="${ant.dir}/docs" />
  +     <jar jarfile="${ant.dir}/lib/ant.jar" basedir="build" items="org"  manifest="src/etc/manifest"/>
  +     <copyfile src="../projectx-tr2.jar" dest="${ant.dir}/lib/xml.jar"/>
  +     <copyfile src="build.xml" dest="${ant.dir}/lib/build.xml"/>
  +     <copydir src="src/bin" dest="${ant.dir}/bin" />
  +     <copydir src="docs" dest="${ant.dir}/docs" />
  +     <jar jarfile="${ant.dir}/src.zip" basedir="src" items="bin,etc,main" />
  +     <chmod perm="+x" src="${ant.dir}/bin/ant" />
  +  </target>
  +
  +  
  +  <target name="package" depends="dist" >
  +     <jar jarfile="${package.dir}/ant.zip" basedir="${ant.dir}" items="bin,lib,docs,src.zip"
/>
  + </target>
  +
  +  <target name="install" >
  +    <!-- make symbolic link -->
  +    <!-- replace ANT_HOME in ant -->
     </target>
   
     <target name="clean">
  
  
  
  1.1                  jakarta-tools/ant/src/bin/ant
  
  Index: ant
  ===================================================================
  #! /bin/sh
  
  if [ "$ANT_HOME" = "" ] ; then
    # try to find ANT
    if [ -d /opt/ant ] ; then 
      ANT_HOME=/opt/ant
    fi
  
    if [ -d ${HOME}/opt/ant ] ; then 
      ANT_HOME=${HOME}/opt/ant
    fi
  
    ## resolve links - $0 may be a link to ant's home
    PRG=$0
    progname=`basename $0`
    
    while [ -L "$PRG" ]; do
      ls=`/bin/ls -ld "$PRG"`
      link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'`
      if /usr/bin/expr "$link" : '/' > /dev/null; then
  	PRG="$link"
      else
  	PRG="`/usr/bin/dirname $PRG`/$link"
      fi
    done
    
    ANT_HOME=`dirname "$PRG"`/..
  
  fi
  
  
  
  CLASSPATH=${ANT_HOME}/lib/ant.jar:${ANT_HOME}/lib/xml.jar:$CLASSPATH
  
  java -Dant.home=${ANT_HOME} org.apache.tools.ant.Main $@
  
  
  

Mime
View raw message