You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by vg...@apache.org on 2003/08/27 17:27:00 UTC

cvs commit: jakarta-regexp/build .cvsignore README build.xml

vgritsenko    2003/08/27 08:27:00

  Modified:    .        .cvsignore
  Added:       .        README build.xml
  Removed:     build    .cvsignore README build.xml
  Log:
  Move build to the root directory. Update README
  
  Revision  Changes    Path
  1.2       +1 -0      jakarta-regexp/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore	11 Feb 2001 23:04:21 -0000	1.1
  +++ .cvsignore	27 Aug 2003 15:27:00 -0000	1.2
  @@ -1 +1,2 @@
   bin
  +velocity.log
  
  
  
  1.1                  jakarta-regexp/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.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.xml file unless you wish to change paths of things.
  
  To build regexp, download and install Ant and invoke 'ant' script from this
  directory.
  
  
  -jon stevens
  jons@apache.org
  
  
  
  1.1                  jakarta-regexp/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- ======================================================================= -->
  <!-- Build file                                                              -->
  <!-- ======================================================================= -->
  <project name="Jakarta-Regexp" default="jar" basedir=".">
  
      <!-- Allow the user to have multiple configuration files and
           specify them using -Dconfiguration.file=filename -->
      <property name="configuration.file" value="build.properties"/> 
  
      <!-- Give user a chance to override without editing this file
           (and without using -D arguments each time they build) -->
      <property file="${user.home}/jakarta-regexp.build.properties" /> 
      <property file="${user.home}/build.properties" />
      <property file="${basedir}/${configuration.file}" />
      <property file="${basedir}/default.properties" />
  
      <!-- =================================================================== -->
      <!-- Initializes some variables                                          -->
      <!-- =================================================================== -->
      <property name="ant.home" value="."/>
      <property name="Name" value="Jakarta-Regexp"/>
      <property name="year" value="2001-2003"/>
      <property name="version" value="1.3-dev"/>
      <property name="project" value="jakarta-regexp"/>
  
      <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/api/"/>
      <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="RETest.txt" value="docs/RETest.txt"/>
      <property name="jakarta-site2.dir" value="../jakarta-site2"/>
  
      <!-- Anakia -->
      <property name="docs.src" value="xdocs"/>
      <property name="docs.dest" value="docs"/>
  
      <!-- Build classpath -->
      <path id="classpath">
          <fileset dir="${jakarta-site2.dir}/lib">
              <exclude name="ant*.jar"/>
              <exclude name="maven*.jar"/>
              <exclude name="*dvsl*.jar"/>
              <include name="*.jar"/>
          </fileset>
      </path>
  
      <!-- =================================================================== -->
      <!-- Copies the source code to the build directory and does filtering    -->
      <!-- =================================================================== -->
      <target name="prepare">
          <tstamp/>
          <filter token="year" value="${year}"/>
          <filter token="version" value="${version}"/>
          <filter token="date" value="${TODAY}"/>
  
          <available classname="org.apache.velocity.anakia.AnakiaTask"
              property="AnakiaTask.present">
              <classpath refid="classpath"/>
          </available>
  
          <mkdir dir="${build.dir}"/>
          <mkdir dir="${build.dest}"/>
          <mkdir dir="${build.src}"/>
          <chmod dir="${build.dir}" perm="774"/>
  
          <copy todir="${build.src}" filtering="yes">
              <fileset dir="${src.java.dir}">
                  <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}"/>
      </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.regexp.*"
              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,docs,javadocs">
          <mkdir dir="${final.dir}"/>
  
          <copy todir="${final.dir}/src/java">
              <fileset dir="${src.java.dir}"/>
          </copy>
          <copy todir="${final.dir}/docs">
              <fileset dir="${docs.dest}">
                  <exclude name="**/dist/**"/>
              </fileset>
          </copy>
          <copy todir="${final.dir}/xdocs">
              <fileset dir="${docs.src}"/>
          </copy>
          <copy todir="${final.dir}/build">
              <fileset dir="build">
                  <exclude name="velocity.log"/>
              </fileset>
          </copy>
          <copy file="LICENSE.txt" tofile="${final.dir}/LICENSE.txt"/>
          <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="./" includes="${final.name}/**"/>
      </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>
  
      <!-- ================================================================== -->
      <!-- I N S T A L L  J A R                                               -->
      <!-- ================================================================== -->
      <target name="install-jar" depends="jar" 
              description="--> Installs .jar file in ${lib.repo}">
        <copy todir="${lib.repo}" filtering="no">
          <fileset dir="${build.dir}">
            <include name="${final.name}.jar"/>
          </fileset>
        </copy>
      </target>
  
      <!-- ================================================================== -->
      <!-- Run RE Test Suite                                                  -->
      <!-- ================================================================== -->
      <target name="test" depends="jar">
        <java classname="org.apache.regexp.RETest" fork="yes">
          <arg value="${RETest.txt}"/>
          <classpath>
            <fileset dir="${build.dir}">
              <include name="${final.name}.jar"/>
            </fileset>
          </classpath>
        </java>
      </target>
  
      <!-- ================================================================== -->
      <!-- Cleans up the build directory                                      -->
      <!-- ================================================================== -->
      <target name="clean">
          <delete dir="${build.dir}"/>
      </target>
  
      <!-- ================================================================== -->
      <!-- Anakia Documentation Builder                                       -->
      <!-- ================================================================== -->
      <target depends="prepare" name="prepare-error" unless="AnakiaTask.present">
          <echo>
              AnakiaTask is not present! Please check to make sure that
              velocity.jar is in your classpath.
          </echo>
      </target>
  
      <target name="docs" depends="prepare-error" if="AnakiaTask.present">
          <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
            <classpath refid="classpath"/>
          </taskdef>
  
          <copy todir="${docs.src}/stylesheets" filtering="no">
              <fileset dir="${jakarta-site2.dir}/xdocs/stylesheets">
                  <include name="site.vsl"/>
              </fileset>
          </copy>
  
          <anakia basedir="${docs.src}" destdir="${docs.dest}/"
               extension=".html" style="./site.vsl"
               projectFile="stylesheets/project.xml"
               excludes="**/stylesheets/** empty.xml"
               includes="**/*.xml"
               lastModifiedCheck="true"
               templatePath="${jakarta-site2.dir}/xdocs/stylesheets">
          </anakia>
          <!-- Not needed for now
          <copy todir="${docs.dest}/images" filtering="no">
              <fileset dir="${docs.src}/images">
                  <include name="**/*.gif"/>
                  <include name="**/*.jpeg"/>
                  <include name="**/*.jpg"/>
              </fileset>
          </copy>
          -->
          <copy todir="${docs.dest}" filtering="no">
              <fileset dir="${docs.src}">
                  <include name="RETest.txt"/>
              </fileset>
          </copy>
      </target>
  </project>