You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-dev@jakarta.apache.org by sn...@apache.org on 2001/04/25 19:21:17 UTC

cvs commit: jakarta-ecs2/lib jakarta-regexp-1.2.jar xerces-1.2.2.jar

snagy       01/04/25 10:21:17

  Added:       build    README ant-1.2.jar build-ecs.bat build-ecs.sh
                        build-ecs.xml
               lib      jakarta-regexp-1.2.jar xerces-1.2.2.jar
  Log:
  Give ecs2 a build system, mostly taken from ecs, and required jar files into
  lib directory for ecs2.
  
  Revision  Changes    Path
  1.1                  jakarta-ecs2/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 
  <du...@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-ecs.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-ecs.xml file unless you wish to change paths of things.
  
  The build-ecs.sh and build-ecs.bat scripts are wrappers that invoke Ant and 
  pass in some arguments, including the path to the XML file, for building 
  ECS. 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-ecs2/build/ant-1.2.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ecs2/build/build-ecs.bat
  
  Index: build-ecs.bat
  ===================================================================
  @echo off
  
  REM --------------------------------------------
  REM No need to edit anything past here
  REM --------------------------------------------
  set _BUILDFILE=%BUILDFILE%
  set BUILDFILE=build-ecs.xml
  
  :final
  
  set _CLASSPATH=%CLASSPATH%
  
  if "%JAVA_HOME%" == "" goto javahomeerror
  if exist %JAVA_HOME%\lib\tools.jar set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
  
  set CLASSPATH=%CLASSPATH%;.\ant-1.2.jar
  set CLASSPATH=%CLASSPATH%;..\lib\xerces-1.2.2.jar
  
  %JAVA_HOME%\bin\java.exe org.apache.tools.ant.Main -buildfile %BUILDFILE% %1 %2 %3 %4 %5 %6 %7 %8 %9
  
  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
  set BUILDFILE=%_BUILDFILE%
  set _BUILDFILE=
  set CLASSPATH=%_CLASSPATH%
  set _CLASSPATH=
  
  
  
  1.1                  jakarta-ecs2/build/build-ecs.sh
  
  Index: build-ecs.sh
  ===================================================================
  #!/bin/sh
  
  #--------------------------------------------
  # 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 -f ${JAVA_HOME}/lib/tools.jar ; then
      CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
  fi
  
  # convert the existing path to unix
  if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
     CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  fi
  
  # Add in your .jar files first
  for i in ./*.jar
  do
      CLASSPATH=$CLASSPATH:"$i"
  done
  for i in ../lib/*.jar
  do
      CLASSPATH=$CLASSPATH:"$i"
  done
  # Add in the jakarta-site2 library files
  for i in ../../jakarta-site2/lib/*.jar
  do
      CLASSPATH=$CLASSPATH:"$i"
  done
  
  # convert the unix path to windows
  if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
     CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  fi
  
  BUILDFILE=build-ecs.xml
  
  ${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \
                        -buildfile ${BUILDFILE} "$@"
  
  
  
  1.1                  jakarta-ecs2/build/build-ecs.xml
  
  Index: build-ecs.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- ======================================================================= -->
  <!-- ECS build file                                                      -->
  <!-- ======================================================================= -->
  
  <project name="ECS" default="jar" basedir=".">
  
      <!-- =================================================================== -->
      <!-- Initializes some variables                                          -->
      <!-- =================================================================== -->
      <property name="Name" value="ECS2"/>
      <property name="year" value="2000-2001"/>
      <property name="version" value="1.2"/>
      <property name="project" value="ecs2"/>
      <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"/>
      <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"/>
      <property name="docs.dest" value="../docs"/>
  
      <path id="classpath">
          <fileset dir="../lib">
  	        <include name="**/*.jar"/>
          </fileset>
      </path>
  
      <!-- ================================================================== -->
      <!-- Prints useful build environment values                             -->
      <!-- ================================================================== -->
      <target name="env">
          <echo message="build.compiler = ${build.compiler}"/>
          <echo message="java.home = ${java.home}"/>
          <echo message="user.home = ${user.home}"/>
          <echo message="java.class.path = ${java.class.path}"/>
          <echo message=""/>
      </target>
  
      <!-- =================================================================== -->
      <!-- Copies the source code to the build directory and does filtering    -->
      <!-- =================================================================== -->
      <target name="prepare" depends="env">
          <tstamp/>
          <filter token="year" value="${year}"/>
          <filter token="version" value="${version}"/>
          <filter token="date" value="${TODAY}"/>
  
          <mkdir dir="${build.dir}"/>
          <mkdir dir="${build.dest}"/>
          <mkdir dir="${build.src}"/>
  
          <copy todir="${build.src}/org" filtering="yes">
              <fileset dir="${src.java.dir}/org">
                  <include name="**/*.java"/>
                  <include name="**/*.properties"/>
                  <include name="**/package.html"/>
              </fileset>
          </copy>
      </target>
  
      <!-- =================================================================== -->
      <!-- Compiles the source directory                                       -->
      <!-- =================================================================== -->
      <target name="compile" depends="prepare">
          <javac srcdir="${build.src}"
              destdir="${build.dest}"
              excludes="**/package.html"
              debug="${debug}"
              deprecation="${deprecation}"
              optimize="${optimize}">
  
              <classpath refid="classpath"/>
          </javac>
          <copy todir="${build.dest}/org" filtering="yes">
              <fileset dir="${build.src}/org">
                  <include name="**/*.properties"/>
              </fileset>
          </copy>
      </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}"
              excludes="**/package.html"
          />
      </target>
      
      <!-- =================================================================== -->
      <!-- Creates the API documentation                                       -->
      <!-- =================================================================== -->
      <target name="javadocs" depends="prepare">
          <mkdir dir="${javadoc.destdir}"/>
          <javadoc
              sourcepath="${build.src}"
              packagenames="org.apache.ecs.*"
              destdir="${javadoc.destdir}"
              author="true"
              private="true"
              version="true"
              use="true"
              windowtitle="${Name} ${version} API"
              doctitle="${Name} ${version} API"
              bottom="Copyright &amp;copy; ${year} Apache Software Foundation. All Rights Reserved."
          >
      	</javadoc>
      </target>
  
      <!-- =================================================================== -->
      <!-- Package                                                             -->
      <!-- =================================================================== -->
      <target name="package" depends="jar,javadocs">
          <mkdir dir="${final.dir}"/>
          <mkdir dir="${final.dir}/src/java"/>
  
          <copy todir="${final.dir}/src/java">
              <fileset dir="${build.dir}/src"/>
          </copy>
          <copy todir="${final.dir}/docs">
              <fileset dir="../docs">
                  <exclude name="**/dist/**"/>
              </fileset>
          </copy>
          <copy todir="${final.dir}/build">
              <fileset dir="../build">
                  <exclude name="velocity.log"/>
              </fileset>
          </copy>
          <copy todir="${final.dir}/lib">
              <fileset dir="../lib"/>
          </copy>
          <copy file="${build.dir}/${final.name}.jar" tofile="${final.dir}/${final.name}.jar"/>    
          <copy file="${build.dir}/${final.name}.jar" tofile="${final.dir}/${final.name}.jar"/>
      </target>
    
      <!-- =================================================================== -->
      <!-- Packages the distribution with ZIP                                  -->
      <!-- =================================================================== -->
      <target name="package-zip" depends="package">
          <delete file="../${final.name}.zip" verbose="false"/>
          <zip zipfile="../${final.name}.zip" basedir="../${final.name}" includes="**/**"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Packages the distribution with TAR-GZIP                             -->
      <!-- =================================================================== -->
      <target name="package-tgz" depends="package">
          <delete file="../${final.name}.tar" verbose="false"/>
          <delete file="../${final.name}.tar.gz" verbose="false"/>
          <tar tarfile="../${final.name}.tar" basedir="../" includes="**/${final.name}/**"/>
          <gzip zipfile="../${final.name}.tar.gz" src="../${final.name}.tar"/>
      </target>
      
      <!-- =================================================================== -->
      <!-- Packages the distribution with ZIP and TAG-GZIP                     -->
      <!-- =================================================================== -->
      <target name="package-all" depends="package-zip, package-tgz">
      </target>
  
      <!-- ================================================================== -->
      <!-- Cleans up the build directory                                      -->
      <!-- ================================================================== -->
      <target name="clean">
          <delete dir="${build.dir}"/>
      </target>
  </project>
  
  
  
  1.1                  jakarta-ecs2/lib/jakarta-regexp-1.2.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ecs2/lib/xerces-1.2.2.jar
  
  	<<Binary file>>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-dev-help@jakarta.apache.org