vmassol 01/06/17 06:31:35 Modified: cactus/conf/sample/build build.xml Log: added logging support using log4j + added new unit test (so that bug #1612 does not appear again !) Revision Changes Path 1.2 +17 -4 jakarta-commons/cactus/conf/sample/build/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-commons/cactus/conf/sample/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 2001/04/09 11:52:27 1.1 +++ build.xml 2001/06/17 13:31:35 1.2 @@ -20,6 +20,8 @@ junit.jar [REQUIRED] The path to the JUnit jar file + log4j.jar [REQUIRED] The path to the Log4j jar file + cactus.ant.jar [REQUIRED] The path to the Cactus custom Ant tasks jar file @@ -169,6 +171,7 @@ <echo message="servlet.jar = ${servlet.jar}"/> <echo message="cactus.jar = ${cactus.jar}"/> <echo message="junit.jar = ${junit.jar}"/> + <echo message="log4j.jar = ${log4j.jar}"/> <echo message="cactus.ant.jar = ${cactus.ant.jar}"/> <!-- Filters --> @@ -253,11 +256,13 @@ <fileset dir="${src.java.dir}"> <patternset refid="all.nonjava.files"/> </fileset> - <fileset dir="${conf.test.dir}"> - <include name="cactus.properties"/> - </fileset> </copy> + <!-- As this classes directory will be used to run the client side + of Cactus, we need to copy the cactus.properties --> + <copy todir="${out.classes.dir}" + file="${conf.test.dir}/cactus.properties"/> + </target> <!-- @@ -291,7 +296,7 @@ <exclude name="**/Test*.*"/> <exclude name="**/test*.*"/> - <!-- Also exclude the test cactus.properties file --> + <!-- Also exclude the cactus.properties files --> <exclude name="cactus.properties"/> </classes> @@ -416,12 +421,17 @@ <classpath> <pathelement path="${java.class.path}"/> <pathelement location="${servlet.jar}"/> + <pathelement location="${log4j.jar}"/> <pathelement location="${cactus.jar}"/> <pathelement location="${out.classes.dir}"/> </classpath> <formatter type="plain" usefile="false"/> + <!-- Note: This test need to run first. See the comments in the + test class for more information on why --> + <test name="org.apache.commons.cactus.sample.unit.TestServletTestCase_TestResult"/> + <!-- Functional tests --> <test name="org.apache.commons.cactus.sample.TestSampleServlet"/> <test name="org.apache.commons.cactus.sample.TestSampleServletConfig"/> @@ -447,6 +457,7 @@ <!-- Gather libraries --> <copy tofile="${out.lib.dir}/junit.jar" file="${junit.jar}"/> + <copy tofile="${out.lib.dir}/log4j.jar" file="${log4j.jar}"/> <copy tofile="${out.lib.dir}[EMAIL PROTECTED]@.jar" file="${cactus.jar}"/> <!-- Make sure the directory for the war exist --> @@ -457,6 +468,7 @@ webxml="${conf.test.dir}/web.xml"> <classes dir="${out.classes.dir}"> + <!-- Exclude the cactus.properties file (client side only) --> <exclude name="cactus.properties"/> </classes> @@ -467,6 +479,7 @@ --> <lib dir="${out.lib.dir}"> <include name="junit.jar"/> + <include name="log4j.jar"/> <include name="[EMAIL PROTECTED]@.jar"/> </lib>