jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@locus.apache.org
Subject cvs commit: jakarta-regexp/build build-regexp.bat build-regexp.sh build-regexp.xml README ant.jar xml.jar
Date Thu, 27 Apr 2000 01:23:44 GMT
jon         00/04/26 18:23:43

  Added:       build    build-regexp.bat build-regexp.sh build-regexp.xml
                        README ant.jar xml.jar
  Log:
  initial checkin of the regexp stuff
  
  Revision  Changes    Path
  1.1                  jakarta-regexp/build/build-regexp.bat
  
  Index: build-regexp.bat
  ===================================================================
  @echo off
  
  
  REM --------------------------------------------
  REM Defualt == jar
  REM "core"           target builds core classes
  REM "clean"          target removes bin directory
  REM "jar"            target builds core + jar
  REM "javadoc"        target builds the javadoc
  REM "package"        target builds core + jar + javadoc + distribution
  REM --------------------------------------------
  set TARGET=%1%
  
  
  REM --------------------------------------------
  REM No need to edit anything past here
  REM --------------------------------------------
  set BUILDFILE=build-regexp.xml
  if "%TARGET%" == "" goto setdist
  goto final
  
  :setdist
  set TARGET=jar
  goto final
  
  :final
  
  if "%JAVA_HOME%" == "" goto javahomeerror
  
  if exist %JAVA_HOME%\lib\tools.jar set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
  set CP=%CLASSPATH%;ant.jar;xml.jar
  
  echo Classpath: %CP%
  echo JAVA_HOME: %JAVA_HOME%
  
  %JAVA_HOME%\bin\java.exe -classpath %CP% org.apache.tools.ant.Main -buildfile %BUILDFILE%
%TARGET%
  
  goto end
  
  
  REM -----------ERROR-------------
  :javahomeerror
  echo "ERROR: JAVA_HOME not found in your environment."
  echo "Please, set the JAVA_HOME variable in your environment to match the"
  echo "location of the Java Virtual Machine you want to use."
  
  :end
  
  
  
  1.1                  jakarta-regexp/build/build-regexp.sh
  
  Index: build-regexp.sh
  ===================================================================
  #!/bin/sh
  
  # --------------------------------------------
  # Defualt == jar
  # "core"           target builds core classes
  # "clean"          target removes bin directory
  # "jar"            target builds core + jar
  # "javadoc"        target builds the javadoc
  # "package"        target builds core + jar + javadoc + distribution
  # --------------------------------------------
  TARGET=${1}
  
  #--------------------------------------------
  # No need to edit anything past here
  #--------------------------------------------
  if test -z "${JAVA_HOME}" ; then
      echo "ERROR: JAVA_HOME not found in your environment."
      echo "Please, set the JAVA_HOME variable in your environment to match the"
      echo "location of the Java Virtual Machine you want to use."
      exit
  fi
  
  if test -z "${TARGET}" ; then 
  TARGET=jar
  fi
  
  if test -f ${JAVA_HOME}/lib/tools.jar ; then
      CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
  fi
  
  echo "Now building ${TARGET}..."
  
  CP=${CLASSPATH}:ant.jar:xml.jar
  
  echo "Classpath: ${CP}"
  echo "JAVA_HOME: ${JAVA_HOME}"
  
  BUILDFILE=build-regexp.xml
  
  ${JAVA_HOME}/bin/java -classpath ${CP} org.apache.tools.ant.Main -buildfile ${BUILDFILE}
${TARGET}
  
  
  
  1.1                  jakarta-regexp/build/build-regexp.xml
  
  Index: build-regexp.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- ======================================================================= -->
  <!-- Build file                                                      -->
  <!-- ======================================================================= -->
  <project name="Jakarta-Regexp" default="main" basedir=".">
  
      <!-- =================================================================== -->
      <!-- Initializes some variables                                          -->
      <!-- =================================================================== -->
      <target name="init">    
          <property name="Name" value="Jakarta-Regexp"/>
          <property name="year" value="2000"/>
          <property name="version" value="1.0"/>
          <property name="project" value="jakarta-regexp"/>
          <property name="build.compiler" value="classic"/>
          <property name="build.dir" value="../bin"/>
          <property name="build.src" value="${build.dir}/src"/>
          <property name="build.dest" value="${build.dir}/classes"/>
          <property name="src.java.dir" value="../src/java"/>
          <property name="javadoc.destdir" value="../docs/apidocs"/>
          <property name="final.name" value="${project}-${version}"/>
          <property name="final.dir" value="../${final.name}/"/>
          <property name="debug" value="off"/>
          <property name="optimize" value="on"/>
          <property name="deprecation" value="off"/>
          
          <filter token="year" value="${year}"/>
          <filter token="version" value="${version}"/>
          <filter token="date" value="${TODAY}"/>
      </target>
  
      <!-- =================================================================== -->
      <!-- Copies the source code to the build directory and does filtering    -->
      <!-- =================================================================== -->
      <target name="prepare" depends="init">
          <mkdir dir="${build.dir}"/>
          <mkdir dir="${build.dest}"/>
          <mkdir dir="${build.src}"/>
  
          <copydir src="${src.java.dir}" dest="${build.src}" 
              includes="**/*.java **/*.properties"
              filtering="on"/>
      </target>
  
      <!-- =================================================================== -->
      <!-- Compiles the source directory                                       -->
      <!-- =================================================================== -->
      <target name="compile" depends="prepare">
          <javac srcdir="${build.src}"
              destdir="${build.dest}"
              debug="${debug}"
              deprecation="${deprecation}"
              optimize="${optimize}"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Compiles the source directory and creates a .jar file               -->
      <!-- =================================================================== -->
      <target name="jar" depends="compile">
          <jar jarfile="${build.dir}/${final.name}.jar"
              basedir="${build.dest}"
              includes="org/**"
              excludes="**/package.html"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Creates the API documentation                                       -->
      <!-- =================================================================== -->
      <target name="javadocs" depends="prepare">
          <mkdir dir="${javadoc.destdir}"/>
          <javadoc packagenames="org.apache.regexp.*"
              sourcepath="${build.src}"
              destdir="${javadoc.destdir}"
              author="true"
              private="true"
              version="true"
              windowtitle="${Name} ${version} API"
              doctitle="${Name} ${version} API"
              bottom="Copyright &#169; ${year} Apache Software Foundation. All Rights
Reserved."
          />
      </target>
      
      <!-- =================================================================== -->
      <!-- Package                                                             -->
      <!-- =================================================================== -->
      <target name="package" depends="jar,javadocs">
          <mkdir dir="${final.dir}"/>
          <mkdir dir="${final.dir}/src/java"/>
          <copydir src="${build.dir}/src/" dest="${final.dir}/src/java/"/>
          <copydir src="../docs" dest="${final.dir}/docs"
              excludes="**/dist/**"/>
          <copydir src="../build" dest="${final.dir}/build"/>
          
          <copyfile src="${build.dir}/${final.name}.jar" dest="${final.dir}/${final.name}.jar"/>
      </target>
    
      <!-- =================================================================== -->
      <!-- Packages the distribution with ZIP                                  -->
      <!-- =================================================================== -->
      <target name="package-zip" depends="package">
          <zip zipfile="../${Name}-${version}.zip" basedir="../" includes="**/${final.name}/**"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Packages the distribution with TAR-GZIP                             -->
      <!-- =================================================================== -->
      <target name="package-tgz" depends="package">
          <tar tarfile="../${Name}-${version}.tar" basedir="../" includes="**/${final.name}/**"/>
          <gzip zipfile="../${Name}-${version}.tar.gz" src="../${Name}-${version}.tar"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Packages the distribution with ZIP and TAG-GZIP                     -->
      <!-- =================================================================== -->
      <target name="package-all" depends="package-zip, package-tgz">
      </target>
  </project>
  
  
  
  1.1                  jakarta-regexp/build/README
  
  Index: README
  ===================================================================
  
  Ant is a build system that was developed for the Jakarta Tomcat project and 
  was used internally at Sun. It was originally developed by James Davidson 
  <duncan@eng.sun.com> and has been extended by others including myself. When 
  Jakarta was released as Open Source, the developer community also obtained 
  the source to Ant as well. This is a great addition to the community.
  
  You can obtain the Ant source code from <http://jakarta.apache.org/>. It is 
  currently located in the jakarta-tools CVS repository.
  
  The build-regexp.xml file is the "code" that tells Ant what to do. The 
  beauty of Ant is that it is entirely XML based so creating installation 
  scripts is as easy as creating a XML file. You should not need to edit the 
  build-regexp.xml file unless you wish to change paths of things.
  
  The build-regexp.sh and build-regexp.bat scripts are wrappers that invoke 
  Ant and pass in some arguments, including the path to the XML file, for 
  building regexp. The .sh script is for Unix systems and the .bat script is 
  for Win32 systems. You should edit the appropriate script for your platform 
  and specify any necessary items to add to your classpath. This is well 
  documented in the scripts source.
  
  -jon stevens
  jons@apache.org
  
  
  
  1.1                  jakarta-regexp/build/ant.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-regexp/build/xml.jar
  
  	<<Binary file>>
  
  

Mime
View raw message