juanco 2002/10/04 14:46:00 Modified: jrcs build.xml Added: jrcs maven_build.xml Removed: jrcs plain_ant_build.xml Log: Renamed the maven based build.xml to maven_build.xml. Renamed plain_ant_build.xml to build.xml. Chanes made for convenience and because no one is currently maintaining the maven build file. Revision Changes Path 1.3 +304 -197 jakarta-commons-sandbox/jrcs/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jrcs/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 14 Jun 2002 01:30:03 -0000 1.2 +++ build.xml 4 Oct 2002 21:46:00 -0000 1.3 @@ -1,214 +1,321 @@ -<?xml version="1.0"?> - -<project name="maven" default="maven:jar" basedir="."> - - <!-- Give user a chance to override without editing this file - (and without typing -D each time they invoke a target) --> +<!-- + * $Id$ + * + * RCS (Revision Control System) archive parsing and manipulation in Java. + + * ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache JRCS" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact [EMAIL PROTECTED] + * + * 5. Products derived from this software may not be called "Apache", + * "Apache JRCS", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * +--> + +<!-- ANT + This is an Ant script for building the JRCS library. + Ant is the Jakarta project's build tool. + You can get a copy of Ant from: + + http://jakarta.apache.org/ant/ + + You'll need to also download the optional Ant tasks if you'll be + running JavaCC or the JUnit tests (more information below). +--> + +<!-- Jakarta ORO + The Jakarta ORO Regexp library is used for RCS keyword management. + You can get a copy of Jakarta ORO from: + + http://jakarta.apache.org/oro/ + + A copy of Jakarta ORO is included in the full distribution of this + library. +--> + +<!-- JavaCC + The RCS parser is constructed using the JavaCC compiler compiler. + You can get a copy of JavaCC from: + + http://www.metamata.com/javacc/ + + JavaCC is not distributable, so you must get a copy of it yourself + if you intend to use it. + Keep in mind that, as distributed, this library does not require + JavaCC to be compiled because all the JavaCC generated .java files + are included. + + If you decide to use JavaCC, please adjust the "javacc.lib.dir" + property as needed. You'll also need to download the set of optional + tasks for Ant. +--> + +<!-- JUnit + The library tests are written for the JUnit Testing Framework. + For distributions and documentation see: + + http://www.junit.org/ + + You'll need to place a copy of junit.jar in Ant's lib directory + to run the tests. +--> + +<project name="RCS archive parsing and manipulation in Java." + default="test" + basedir="." > <!-- Allow any user specific values to override the defaults --> <property file="${user.home}/build.properties" /> <!-- Allow user defaults for this project --> <property file="build.properties" /> - <!-- Set default values for the build --> - <property file="project.properties" /> - <!-- ================================================================== --> - <!-- J A V A C C --> - <!-- ================================================================== --> + <property name="app.name" value="jrcs" /> + <property name="version" value="0.1.5" /> - <target - name="javacc"> - - <echo> - JavaCC Home => ${javacc.home} - </echo> - - <mkdir dir="${maven.outputDirectory}"/> - - <jjtree - target="${maven.parserJJTreeGrammar}" - javacchome="${maven.javacc.home}" - nodepackage="${maven.nodePackage}" - /> - - <javacc - target="${maven.parserGrammar}" - javacchome="${maven.javacc.home}" - debugparser="false" - debugtokenmanager="false" + <property name="src.dir" value="${basedir}/src" /> + <property name="java.dir" value="${src.dir}/java" /> + <property name="tests.dir" value="${src.dir}/test" /> + <property name="lib.dir" value="${basedir}/lib" /> + <property name="dist.dir" value="${basedir}/dist" /> + <property name="classes" value="${basedir}/classes" /> + <property name="javadoc" value="${basedir}/doc/api" /> + <property name="test.classes" value="${basedir}/test-classes" /> + + <property name="javacc.lib.dir" value="${javacc.home}/bin/lib" /> + +<!-- <property name="build.compiler" value="jikes" /> --> +<!-- <property name="build.compiler" value="classic"/> --> + + <property name="rcs.jar" value="${lib.dir}/org.apache.commons.jrcs.rcs.jar" /> + <property name="diff.jar" value="${lib.dir}/org.apache.commons.jrcs.diff.jar" /> + <property name="tests.jar" value="${lib.dir}/org.apache.commons.jrcs.tests.jar" /> + <property name="regexp.jar" value="${lib.dir}/jakarta-oro-2.0.6.jar" /> + <property name="junit.jar" value="${lib.dir}/junit-3.8.jar" /> + <property name="libs" + value="${diff.jar};${rcs.jar};${regexp.jar};${tests.jar};${junit.jar}" /> + + <target name="prepare"> + <available file="${javacc.lib.dir}/JavaCC.zip" property="javacc.present" /> + <mkdir dir="${classes}" /> + <mkdir dir="${test.classes}" /> + <mkdir dir="${lib.dir}" /> + </target> + + <target name="tidy"> + <delete dir="${classes}" /> + </target> + + <target name="clean" depends="tidy"> + <delete dir="${javadoc}" /> + <delete dir="${dist.dir}" /> + + <delete file="${diff.jar}" /> + <delete file="${rcs.jar}" /> + <delete file="${tests.jar}" /> + </target> + + <patternset id="non.java.sources"> + <include name="**/*.properties" /> + <include name="**/*.html" /> + <include name="**/defaultManifest.mf" /> + </patternset> + + <target name="diff" depends="prepare"> + <copy todir="${classes}"> + <fileset dir="${java.dir}"> + <patternset refid="non.java.sources" /> + </fileset> + </copy> + + <javac srcdir="${java.dir}" + destdir="${classes}" + classpath="${libs}" + debug="on" optimize="on" deprecation="on" > + <include name="**/jrcs/diff/**/*.java" /> + <include name="**/jrcs/util/**/*.java" /> + <exclude name="**/*Test*.class" /> + </javac> + + <jar jarfile="${diff.jar}" basedir="${classes}" > + <include name="org/apache/commons/jrcs/diff/**" /> + <include name="org/apache/commons/jrcs/util/**" /> + <exclude name="**/*Test*.class" /> + </jar> + </target> + + <target name="parser" if="javacc.present" > + <javacc + target="${java.dir}/org/apache/commons/jrcs/rcs/ArchiveParser.jj" + outputdirectory="${java.dir}/org/apache/commons/jrcs/rcs/" + javacchome="${javacc.lib.dir}" + optimizetokenmanager="true" /> - + <echo message="parser built" /> + </target> + + <target name="rcs" depends="prepare,diff,parser"> + <javac srcdir="${java.dir}" + destdir="${classes}" + classpath="${libs};classes" + debug="on" optimize="on" deprecation="on" > + <include name="**/jrcs/rcs/**/*.java" /> + <exclude name="**/*Test*.class" /> + </javac> + + <jar jarfile="${rcs.jar}" basedir="${classes}" > + <include name="org/apache/commons/jrcs/rcs/**" /> + <exclude name="**/*Test*.class" /> + </jar> </target> - <target - name="javacc-jrcs"> + <target name="tests" depends="prepare,diff,rcs"> + <javac srcdir="${tests.dir}" + destdir="${test.classes}" + classpath="${libs};${classes}" + debug="on" optimize="on" deprecation="on"> + <include name="**/*.java" /> + </javac> + + <jar jarfile="${tests.jar}" basedir="${test.classes}" > + <include name="**/*test*.class" /> + <include name="**/*Test*.class" /> + </jar> + </target> + + <target name="libs" depends="diff,rcs"> + </target> + + <target name="test" depends="tests"> + <junit printsummary="yes" > + <classpath> + <pathelement path="${libs}" /> + <pathelement location="${libs}/*.jar" /> + </classpath> - <echo> - JavaCC Home => ${javacc.home} - </echo> - - <javacc - target="${maven.parserGrammar.jrcs}" - javacchome="${javacc.home}" - /> - + <formatter type="plain" /> + + <test name="org.apache.commons.jrcs.AllTests" + haltonfailure="no" + > + <!-- <formatter type="plain" usefile="no" /> --> + </test> + </junit> + +<!-- + <java classname="tests" + classpath="${libs}" + fork="yes" + failonerror="yes" + /> +--> </target> - <!-- ================================================================== --> - <!-- C A L L B A C K S --> - <!-- ================================================================== --> - - <!-- copy files required by unittests, so that they can be found on --> - <!-- the classpath at runtime during testing --> - <target - name="copy-test-files"> - <copy todir="target/test-classes"> - <fileset dir="src/test" includes="**/*.testfile"/> - </copy> + <target name="javadoc" depends="libs"> + <mkdir dir="${javadoc}" /> + <javadoc packagenames="org.apache.commons.jrcs.*" + sourcepath="${java.dir}" + destdir="${javadoc}" + classpath="${libs};classes" + author="true" + version="true" + private="yes" + overview="java/org/apache/commons/jrcs/overview.html" + windowtitle="${app.name} API" + doctitle="${app.name}" + bottom="Copyright 2002 the Apache Software Foundation<br> + Copyright © 1999-2001 Juancarlo Añez, Caracas, Venezuela.<br> + All rights reserved<br>. + http://www.suigeneris.org/jrcs" + > + </javadoc> + </target> + + <target name="all" depends="prepare,libs,test,javadoc" /> + + <target name="compact.dist" depends="all"> + <mkdir dir="${dist.dir}" /> + <property name="tarfile" value="${dist.dir}/jrcs-${version}.tar" /> + <delete file="${tarfile}" /> + + <tar tarfile="${tarfile}" basedir="${basedir}"> + <exclude name="classes/**/*" /> + <exclude name="dist/**/*" /> + <exclude name="lib/gnu*.jar" /> + <exclude name="lib/junit*.jar" /> + <exclude name="lib/JavaCC.zip" /> + </tar> + + <delete file="${tarfile}.gz" /> + <gzip zipfile="${tarfile}.gz" src="${tarfile}" /> + + <delete file="${tarfile}" /> </target> - - <!-- maven:start --> - - <!-- ================================================================== --> - <!-- D E L E G A T O R S --> - <!-- ================================================================== --> - - <target name="maven:gump-descriptor"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="gump-descriptor"/> - </target> - - <target name="maven:maven-update"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="maven-update"/> - </target> - - <target name="maven:update-jars"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/> - </target> - - <target name="maven:jar"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/> - </target> - - <target name="maven:docs-quick"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs-quick"/> - </target> - - <target name="maven:run-singletest"> - <ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/> - </target> - - <target name="maven:compile"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/> - </target> - - <target name="maven:fo"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="fo"/> - </target> - - <target name="maven:cvs-change-log"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="cvs-change-log"/> - </target> - - <target name="maven:war"> - <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/> - </target> - - <target name="maven:generate-reactor"> - <ant antfile="${maven.home}/plugins/reactor/build.xml" target="generate-reactor"/> - </target> - - <target name="maven:cross-ref"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="cross-ref"/> - </target> - - <target name="maven:deploy-site"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/> - </target> - - <target name="maven:ear"> - <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/> - </target> - - <target name="maven:install-jar"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="install-jar"/> - </target> - - <target name="maven:task-list"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="task-list"/> - </target> - - <target name="maven:docs"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs"/> - </target> - - <target name="maven:site"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="site"/> - </target> - - <target name="maven:deploy-dist"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="deploy-dist"/> - </target> - - <target name="maven:javadocs"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/> - </target> - - <target name="maven:announce"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="announce"/> - </target> - - <target name="maven:check-source"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="check-source"/> - </target> - - <target name="maven:dist"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="dist"/> - </target> - - <target name="maven:dist-build"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="dist-build"/> - </target> - - <target name="maven:metrics"> - <ant antfile="${maven.home}/plugins/metrics/build.xml" target="metrics"/> - </target> - - <target name="maven:clean"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="clean"/> - </target> - - <target name="maven:env"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="env"/> - </target> - - <target name="maven:test"> - <ant antfile="${maven.home}/plugins/test/build.xml" target="test"/> - </target> - - <target name="maven:pdf"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="pdf"/> - </target> - - <target name="maven:iutest"> - <ant antfile="${maven.home}/plugins/iutest/build.xml" target="iutest"/> - </target> - - <target name="maven:activity-log"> - <ant antfile="${maven.home}/plugins/docs/build.xml" target="activity-log"/> - </target> - - <target name="maven:verify-project"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="verify-project"/> - </target> - - <target name="maven:validate-pom"> - <ant antfile="${maven.home}/plugins/core/build.xml" target="validate-pom"/> - </target> - - <target name="maven:validate-war"> - <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/> - </target> - <!-- maven:end --> + <target name="full.dist" depends="all"> + <mkdir dir="${dist.dir}" /> + <property name="full.tarfile" value="${dist.dir}/jrcs-full-${version}.tar" /> + <delete file="${full.tarfile}" /> + + <tar tarfile="${full.tarfile}" basedir="${basedir}"> + <exclude name="${full.tarfile}" /> + <exclude name="**/CVS/*" /> + <exclude name="classes/**/*" /> + <exclude name="dist/**/*" /> + <exclude name="lib/JavaCC.zip" /> + </tar> + <delete file="${full.tarfile}.gz" /> + <gzip zipfile="${full.tarfile}.gz" src="${full.tarfile}" /> + + <delete file="${full.tarfile}" /> + </target> + + <target name="dist" depends="compact.dist,full.dist" /> </project> + 1.1 jakarta-commons-sandbox/jrcs/maven_build.xml Index: maven_build.xml =================================================================== <?xml version="1.0"?> <project name="maven" default="maven:jar" basedir="."> <!-- Give user a chance to override without editing this file (and without typing -D each time they invoke a target) --> <!-- Allow any user specific values to override the defaults --> <property file="${user.home}/build.properties" /> <!-- Allow user defaults for this project --> <property file="build.properties" /> <!-- Set default values for the build --> <property file="project.properties" /> <!-- ================================================================== --> <!-- J A V A C C --> <!-- ================================================================== --> <target name="javacc"> <echo> JavaCC Home => ${javacc.home} </echo> <mkdir dir="${maven.outputDirectory}"/> <jjtree target="${maven.parserJJTreeGrammar}" javacchome="${maven.javacc.home}" nodepackage="${maven.nodePackage}" /> <javacc target="${maven.parserGrammar}" javacchome="${maven.javacc.home}" debugparser="false" debugtokenmanager="false" /> </target> <target name="javacc-jrcs"> <echo> JavaCC Home => ${javacc.home} </echo> <javacc target="${maven.parserGrammar.jrcs}" javacchome="${javacc.home}" /> </target> <!-- ================================================================== --> <!-- C A L L B A C K S --> <!-- ================================================================== --> <!-- copy files required by unittests, so that they can be found on --> <!-- the classpath at runtime during testing --> <target name="copy-test-files"> <copy todir="target/test-classes"> <fileset dir="src/test" includes="**/*.testfile"/> </copy> </target> <!-- maven:start --> <!-- ================================================================== --> <!-- D E L E G A T O R S --> <!-- ================================================================== --> <target name="maven:gump-descriptor"> <ant antfile="${maven.home}/plugins/core/build.xml" target="gump-descriptor"/> </target> <target name="maven:maven-update"> <ant antfile="${maven.home}/plugins/core/build.xml" target="maven-update"/> </target> <target name="maven:update-jars"> <ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/> </target> <target name="maven:jar"> <ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/> </target> <target name="maven:docs-quick"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs-quick"/> </target> <target name="maven:run-singletest"> <ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/> </target> <target name="maven:compile"> <ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/> </target> <target name="maven:fo"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="fo"/> </target> <target name="maven:cvs-change-log"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="cvs-change-log"/> </target> <target name="maven:war"> <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/> </target> <target name="maven:generate-reactor"> <ant antfile="${maven.home}/plugins/reactor/build.xml" target="generate-reactor"/> </target> <target name="maven:cross-ref"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="cross-ref"/> </target> <target name="maven:deploy-site"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/> </target> <target name="maven:ear"> <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/> </target> <target name="maven:install-jar"> <ant antfile="${maven.home}/plugins/core/build.xml" target="install-jar"/> </target> <target name="maven:task-list"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="task-list"/> </target> <target name="maven:docs"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs"/> </target> <target name="maven:site"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="site"/> </target> <target name="maven:deploy-dist"> <ant antfile="${maven.home}/plugins/core/build.xml" target="deploy-dist"/> </target> <target name="maven:javadocs"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/> </target> <target name="maven:announce"> <ant antfile="${maven.home}/plugins/core/build.xml" target="announce"/> </target> <target name="maven:check-source"> <ant antfile="${maven.home}/plugins/core/build.xml" target="check-source"/> </target> <target name="maven:dist"> <ant antfile="${maven.home}/plugins/core/build.xml" target="dist"/> </target> <target name="maven:dist-build"> <ant antfile="${maven.home}/plugins/core/build.xml" target="dist-build"/> </target> <target name="maven:metrics"> <ant antfile="${maven.home}/plugins/metrics/build.xml" target="metrics"/> </target> <target name="maven:clean"> <ant antfile="${maven.home}/plugins/core/build.xml" target="clean"/> </target> <target name="maven:env"> <ant antfile="${maven.home}/plugins/core/build.xml" target="env"/> </target> <target name="maven:test"> <ant antfile="${maven.home}/plugins/test/build.xml" target="test"/> </target> <target name="maven:pdf"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="pdf"/> </target> <target name="maven:iutest"> <ant antfile="${maven.home}/plugins/iutest/build.xml" target="iutest"/> </target> <target name="maven:activity-log"> <ant antfile="${maven.home}/plugins/docs/build.xml" target="activity-log"/> </target> <target name="maven:verify-project"> <ant antfile="${maven.home}/plugins/core/build.xml" target="verify-project"/> </target> <target name="maven:validate-pom"> <ant antfile="${maven.home}/plugins/core/build.xml" target="validate-pom"/> </target> <target name="maven:validate-war"> <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/> </target> <!-- maven:end --> </project>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>