ceki 01/03/15 09:40:01 Modified: build build.xml manifest.mf Added: build build.bat build.properties build.sh package-list build/lib ant.jar jaxp.jar parser.jar Log: Revision Changes Path 1.13 +101 -65 jakarta-log4j/build/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-log4j/build/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- build.xml 2001/02/23 20:07:11 1.12 +++ build.xml 2001/03/15 17:39:58 1.13 @@ -4,9 +4,10 @@ <!-- ================================================================= --> -<!-- NOTE: all directories are relative to the parent of build/ --> +<!-- NOTE: all directories are relative to jakarta-log4j/ --> +<!-- the parent of build/ --> <!-- ================================================================= --> -<project name="log4j" default="usage" basedir=".." > +<project name="log4j" default="usage" basedir="." > <target name="usage"> @@ -14,14 +15,11 @@ ant build - compile all project files, if a certain library is missing, then the compilation of its dependents is skipped. - ant compile - compile files in local directory only - ant javadoc - build project javadoc files ant jar - build log4j-core and log4j jar files - - ant dist - will create a distribution in dist/ + ant dist - will create a complete distribution in dist/ </echo> </target> @@ -84,17 +82,11 @@ <!-- ================================================================= --> <!-- Initialize variables --> - <!-- NOTE: all directories are relative to ../build/ --> + <!-- NOTE: all directories are relative to jakarta-log4j/ --> <!-- ================================================================= --> <target name="init"> <tstamp /> - <property name="java.source.dir" value="." /> - <property name="javac.dest" value="classes" /> - <property name="jar.dest" value="dist" /> - <property name="docs" value="docs" /> - <property name="javadoc.dest" value="${docs}/api" /> - <property name="stem" value="org/apache/log4j" /> - <property name="version" value="1.1b1"/> + <property file="build.properties" /> </target> <target name="build" depends="init, build.core, build.swing, build.xml, @@ -123,7 +115,7 @@ <target name="build.swing" depends="init, swing" if="swing-present"> <mkdir dir="${javac.dest}/icons"/> <copy todir="${javac.dest}/icons" > - <fileset dir="icons"/> + <fileset dir="${icons.source}"/> </copy> <javac srcdir="${java.source.dir}" @@ -147,7 +139,7 @@ excludes="${stem}/xml/examples/doc-files/**.java, ${stem}/xml/Transform.java" classpath="${classpath}"/> - <copy file="${stem}/xml/log4j.dtd" + <copy file="${BSTEM}/xml/log4j.dtd" tofile="${javac.dest}/${stem}/xml/log4j.dtd" /> </target> @@ -166,22 +158,34 @@ classpath="${classpath}"/> </target> - + <!-- ================================================================= --> + <!-- Remove all generated (compiled) class files. --> + <!-- ================================================================= --> <target name="clean" depends="init"> <delete dir="${javac.dest}/" /> </target> - <target name="jar" depends="log4j-core.jar, log4j.jar"/> + <!-- ================================================================= --> + <!-- Remove the temporary manifest file, actual work is done in the --> + <!-- dependencies. --> + <!-- ================================================================= --> + <target name="jar" depends="log4j-core.jar, log4j.jar"> + <delete file="${jar.dest}/manifest.mf"/> + </target> <target name="prejar" depends="build"> <mkdir dir="${jar.dest}"/> <filter token="version" value="${version}" /> - <copy file="build/manifest.mf" tofile="${jar.dest}/manifest.mf" filtering="true"/> + <copy file="${manifest.src}" tofile="${jar.dest}/manifest.mf" + filtering="true"/> </target> + + <!-- ================================================================= --> + <!-- Create log4j-core.jar, exluding non-core files --> + <!-- ================================================================= --> - <!-- Create log4j-core.jar, exluding non-core files --> <target name="log4j-core.jar" depends="prejar"> <delete file="${jar.dest}/log4j-core.jar"/> <jar jarfile="${jar.dest}/log4j-core.jar" basedir="${javac.dest}" @@ -190,27 +194,30 @@ excludes="**/StressCategory*, **/TTCC*, **/SimpleLayout.*, **/AsyncAppender.*, **/Dispatcher.*, **/BoundedFIFO.*, **/Syslog*, **/RelativeTimeDateFormat.*, - **/gui/**/*.class, **/Loader.class, + ${stem}/gui/**/*.class, **/Loader.class, **/UnitTest*.class, ${stem}/or/MessageRenderer.class, ${stem}/spi/TriggeringEventEvaluator.class - org/apache/log4j/helpers/CyclicBuffer.class" - manifest="dist/manifest.mf" + ${stem}/helpers/CyclicBuffer.class" + manifest="${jar.dest}/manifest.mf" /> </target> - <!-- Create log4j.jar, excluding tests and other odds and - ends. --> + <!-- ================================================================= --> + <!-- Create log4j.jar, excluding tests and other odds and ends. --> + <!-- ================================================================= --> <target name="log4j.jar" depends="prejar"> <delete file="${jar.dest}/log4j.jar"/> <jar jarfile="${jar.dest}/log4j.jar" basedir="${javac.dest}" - includes="**/log4j/*.class, ${stem}/xml/log4j.dtd, - **/log4j/helpers/*.class, icons/**, - **/log4j/spi/*.class, **/log4j/net/*.class, - **/log4j/varia/*.class, **/log4j/nt/*.class, - **/log4j/xml/*.class, - **/log4j/or/*.class, - **/log4j/gui/TextPaneAppender.class" + includes="${stem}/*.class, ${stem}/xml/log4j.dtd, + ${stem}/helpers/*.class, icons/**, + ${stem}/spi/*.class, + ${stem}/net/*.class, + ${stem}/varia/*.class, + ${stem}/nt/*.class, + ${stem}/xml/*.class, + ${stem}/or/*.class, + ${stem}/gui/TextPaneAppender.class" excludes="**/StressCategory*, **/UnitTest**" manifest="${jar.dest}/manifest.mf" /> @@ -224,8 +231,8 @@ <mkdir dir="${javadoc.dest}" /> - <copy todir="${stem}/examples/doc-files/"> - <fileset dir="${stem}/examples/" + <copy todir="${BSTEM}/examples/doc-files/"> + <fileset dir="${BSTEM}/examples/" includes="Sort.java, SortAlgo.java, Trivial.java, MyCategory.java, MyCategoryFactory.java, mycat.good, mycat.bad, factor.html, MyPatternLayout.java, MyPatternParser.java, sort2.lcf, sort3.lcf, @@ -233,14 +240,14 @@ NumberCruncher.java, factor.lcf, sort4.lcf"/> </copy> - <copy todir="${stem}/xml/examples/doc-files/" > - <fileset dir="${stem}/xml/examples/" - includes="XMLSample.java, sample1.xml, sample2.xml, extension1.xml, - extension2.xml, XCategory.java,XTest.java"/> + <copy todir="${BSTEM}/xml/examples/doc-files/" > + <fileset dir="${BSTEM}/xml/examples/" + includes="XMLSample.java, sample*.xml, extension1.xml, + extension2.xml, XCategory.java, XTest.java"/> </copy> - <copy todir="${stem}/xml/doc-files/" > - <fileset dir="${stem}/xml/" includes="log4j.dtd"/> + <copy todir="${BSTEM}/xml/doc-files/" > + <fileset dir="${BSTEM}/xml/" includes="log4j.dtd"/> </copy> @@ -271,50 +278,79 @@ <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api" - packageListLoc="packaging"/> + packageListLoc="${packaging.dir}"/> </javadoc> </target> - + <!-- ================================================================= --> + <!-- Build a complete distribution. Results go to ${dist.images} --> + <!-- ================================================================= --> <target name="dist" depends="init, clean, jar, javadoc"> <delete verbose="true"> <fileset dir="."> - <patternset includes="**/*.bak,${stem}/**/temp*,${stem}/performance/test, - ${stem}test/current.*,{$stem}/examples/test,{$stem}/test/logging.*, - ${stem}/test/log4j.properties,{$stem}/test/socket.lcf, - ${stem}/test/file,${stem}/test/output.*, - ${stem}/nt/EventLogCategories.dbg,${stem}/nt/EventLogCategories.h, - ${stem}/nt/EventLogCategories.rc,${stem}/nt/EventLogCategories.RES, - ${stem}/nt/MSG00001.bin,${stem}/nt/NTEventLogAppender.lib, - ${stem}/nt/NTEventLogAppender.exp,${stem}/nt/vc50.idb, - ${stem}/net/test/loop.log,${stem}/net/test/loop.log.1, - ${jar.dest}/manifest.mf, ${javac.dest}/*.class"/> + <patternset includes="**/*.bak, + ${BSTEM}/**/temp*, + ${BSTEM}/performance/test, + ${BSTEM}test/current.*, + ${BSTEM}/examples/test, + ${BSTEM}/test/logging.*, + ${BSTEM}/test/log4j.properties, + {$BSTEM}/test/socket.lcf, + ${BSTEM}/test/file,${BSTEM}/test/output.*, + ${BSTEM}/nt/EventLogCategories.dbg, + ${BSTEM}/nt/EventLogCategories.h, + ${BSTEM}/nt/EventLogCategories.rc, + ${BSTEM}/nt/EventLogCategories.RES, + ${BSTEM}/nt/MSG00001.bin, + ${BSTEM}/nt/NTEventLogAppender.lib, + ${BSTEM}/nt/NTEventLogAppender.exp, + ${BSTEM}/nt/vc50.idb, + ${BSTEM}/net/test/loop.log, + ${BSTEM}/net/test/loop.log.1, + ${jar.dest}/manifest.mf, + ${javac.dest}/*.class"/> </fileset> </delete> + + <mkdir dir="${dist.images}" /> - <mkdir dir="dist/tmp/jakarta-log4j-${version}" /> + <mkdir dir="${dist.tmp}/jakarta-log4j-${version}" /> - <copy todir="dist/tmp/jakarta-log4j-${version}"> - <fileset dir="." - includes="make/**, xdocs/**, docs/**, Makefile, build/* - manifest.mf, INSTALL, LICENSE.APL, ${jar.dest}/*.jar, - org/**, icons/**, ${javac.dest}/**, contribs/**" - excludes="make/make.loc, **/*.bak, **/.#*, - ${stem}/xml/Transform.java"/> + <copy todir="${dist.tmp}/jakarta-log4j-${version}"> + <fileset dir="${base}" + includes="make/**, + xdocs/**, + docs/**, + Makefile, + build/* + manifest.mf, + INSTALL, + LICENSE.APL, + ${jar.dest}/*.jar, + org/**, + icons/**, + ${javac.dest}/**, + contribs/**" + excludes="make/make.loc, + **/*.bak, + **/.#*, + ${BSTEM}/xml/Transform.java"/> </copy> - <tar tarfile="dist/jakarta-log4j-${version}.tar" basedir="dist/tmp" + <tar tarfile="${dist.images}/jakarta-log4j-${version}.tar" + basedir="${dist.tmp}" includes="jakarta-log4j-${version}/**" /> - <gzip src="dist/jakarta-log4j-${version}.tar" - zipfile="dist/jakarta-log4j-${version}.tar.gz" /> + <gzip src="${dist.images}/jakarta-log4j-${version}.tar" + zipfile="${dist.images}/jakarta-log4j-${version}.tar.gz" /> - <zip zipfile="dist/jakarta-log4j-${version}.zip" basedir="dist/tmp" + <zip zipfile="${dist.images}/jakarta-log4j-${version}.zip" + basedir="${dist.tmp}" includes="jakarta-log4j-${version}/**" /> - <delete dir="dist/tmp/" /> + <delete dir="${dist.tmp}" /> </target> 1.2 +1 -1 jakarta-log4j/build/manifest.mf Index: manifest.mf =================================================================== RCS file: /home/cvs/jakarta-log4j/build/manifest.mf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- manifest.mf 2001/02/20 19:16:44 1.1 +++ manifest.mf 2001/03/15 17:39:58 1.2 @@ -3,6 +3,6 @@ Name: org/apache/log4j/ Implementation-Title: log4j Implementation-Version: @version@ -Implementation-Vendor: "Apache Softwate Foundation" +Implementation-Vendor: "Apache Software Foundation" 1.1 jakarta-log4j/build/build.bat Index: build.bat =================================================================== @echo off REM -------------------------------------------- REM No need to edit anything past here REM -------------------------------------------- set _BUILDFILE=%BUILDFILE% set BUILDFILE=build.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%;lib\ant.jar; set CLASSPATH=%CLASSPATH%;lib\jaxp.jar; set CLASSPATH=%CLASSPATH%;lib\parser.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-log4j/build/build.properties Index: build.properties =================================================================== # ----------------------------------------------- # All values are relative to the build/ directory # ----------------------------------------------- # The version we are building version=1.1b2 # The base directory relative to which most targets are # built base=.. # The directory where source files are stored java.source.dir=.. # The directory where the package-list file is # found, build/ or ./ in this case. packaging.dir=. # Destination for compiled files javac.dest=../dist/classes # Destination for generated jar files jar.dest=../dist/lib # Destination for documentation files generated or not docs=../docs # Destination for javadoc generated files javadoc.dest=../docs/api # Icons source directory icons.source=../icons # The stem where most log4j source code is located stem=org/apache/log4j # BSTEM should equal ${java.source.dir}/${stem} BSTEM=../org/apache/log4j # Original manifest.mf file before filtering manifest.src=../build/manifest.mf # Directory where release images go dist.images=../dist/images # Directory for temporary files dist.tmp=../dist/tmp 1.1 jakarta-log4j/build/build.sh Index: build.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 ANT_JAR='lib/ant.jar' JAXP_JAR='lib/jaxp.jar' PARSER_JAR='lib/parser.jar' CLASSPATH=${CLASSPATH}:${ANT_JAR} CLASSPATH=${CLASSPATH}:${JAXP_JAR} CLASSPATH=${CLASSPATH}:${PARSER_JAR} # convert the unix path to windows if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then CLASSPATH=`cygpath --path --windows "$CLASSPATH"` fi BUILDFILE=build.xml ${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \ -buildfile ${BUILDFILE} "$@" 1.1 jakarta-log4j/build/package-list Index: package-list =================================================================== java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event java.awt.font java.awt.geom java.awt.im java.awt.image java.awt.image.renderable java.awt.print java.beans java.beans.beancontext java.io java.lang java.lang.ref java.lang.reflect java.math java.net java.rmi java.rmi.activation java.rmi.dgc java.rmi.registry java.rmi.server java.security java.security.acl java.security.cert java.security.interfaces java.security.spec java.sql java.text java.util java.util.jar java.util.zip javax.accessibility javax.swing javax.swing.border javax.swing.colorchooser javax.swing.event javax.swing.filechooser javax.swing.plaf javax.swing.plaf.basic javax.swing.plaf.metal javax.swing.plaf.multi javax.swing.table javax.swing.text javax.swing.text.html javax.swing.text.html.parser javax.swing.text.rtf javax.swing.tree javax.swing.undo org.omg.CORBA org.omg.CORBA.DynAnyPackage org.omg.CORBA.ORBPackage org.omg.CORBA.portable org.omg.CORBA.TypeCodePackage org.omg.CosNaming org.omg.CosNaming.NamingContextPackage 1.1 jakarta-log4j/build/lib/ant.jar <<Binary file>> 1.1 jakarta-log4j/build/lib/jaxp.jar <<Binary file>> 1.1 jakarta-log4j/build/lib/parser.jar <<Binary file>> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]