Author: bayard Date: Wed Jul 18 14:11:26 2007 New Revision: 557397 URL: http://svn.apache.org/viewvc?view=rev&rev=557397 Log: The build.xml is simplified, using an include/exclude approach with the <junit> task rather than defining a task per test package. The build.properties.sample is updated to look in the local .maven by default, making it easier for the average committer to test the ant build out. See: DIGESTER-117
Modified: jakarta/commons/proper/digester/trunk/build.properties.sample jakarta/commons/proper/digester/trunk/build.xml Modified: jakarta/commons/proper/digester/trunk/build.properties.sample URL: http://svn.apache.org/viewvc/jakarta/commons/proper/digester/trunk/build.properties.sample?view=diff&rev=557397&r1=557396&r2=557397 ============================================================================== --- jakarta/commons/proper/digester/trunk/build.properties.sample (original) +++ jakarta/commons/proper/digester/trunk/build.properties.sample Wed Jul 18 14:11:26 2007 @@ -1,57 +1,56 @@ -#------------------------------------------------------------------------ -# Ant configuration file -# -# When building Digester using Ant it is necessary to provide Ant with -# some configuration information about the setup of the host machine on -# which the build is happening. +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +########################################################################## +# Sample Ant build.properties file +# +# This setup assumes dependent jars are in a local maven 1 repository. +# However the jars are located, the properties ending in ".jar" need +# expand to full paths to the jars. # # Copy this file (build.properties.sample) to "build.properties" then edit # entries below as appropriate before running any Ant commands. -# -#------------------------------------------------------------------------ +########################################################################## -# Specify a base directory where required jar files can be found. -# Alternatively, provide complete paths to all of the needed libaries below. +# Repository base path +repository=${user.home}/.maven/repository -root=/java/jars +# JUnit +junit.home=${repository}/junit/jars +junit.jar=${junit.home}/junit-3.8.1.jar +# XML parser # When using java 1.3 or earlier, JAXP is not included in the standard # libraries, so external jar files are required. If you are using Java # 1.4 or later, you can omit these libraries -# -# Note that when using xerces parser, the bundled xml-apis.jar provides the -# same classes as Sun's jaxp.jar. - -jaxp.home=${root} -jaxp.jaxp.jar=${jaxp.home}/jaxp.jar -jaxp.parser.jar=${jaxp.home}/crimson.jar - -# Digester depends upon several other commons projects. -# -# If you are building Digester from a checkout of the "trunks-proper" directory -# and have already built the latest code for each of the dependent projects -# then these paths are automatically correct. -# -# In other circumstances, provide direct paths (possibly based on ${root} -# to all these required libraries. -# -# Note that Digester no longer depends on commons-collections itself; there is -# a runtime dependency currently inherited from commons-beanutils, however. -# -# See file project.xml or RELEASE-NOTES.txt for the specific versions of these -# files which are required. - -commons-beanutils.home=../beanutils/dist -commons-beanutils.jar=${commons-beanutils.home}/commons-beanutils.jar -commons-logging.home=../logging/dist -commons-logging.jar=${commons-logging.home}/commons-logging.jar - -# JUnit is required if compiling/running the unit tests - -junit.jar=${root}/junit.jar +jaxp.parser.home=${repository}/xerces/jars +jaxp.parser.jar=${jaxp.parser.home}/xerces-2.0.2.jar +jaxp.jaxp.home=${repository}/xml-apis/jars +jaxp.jaxp.jar=${jaxp.jaxp.home}/xml-apis-1.0.b2.jar + +# Commons logging +commons-logging.home=${repository}/commons-logging/jars +commons-logging.jar=${commons-logging.home}/commons-logging-1.1.jar + +# Commons beanutils +commons-beanutils.home=${repository}/commons-beanutils/jars +commons-beanutils.jar=${commons-beanutils.home}/commons-beanutils-1.7.0.jar # The digester tests output logging information (including Exceptions) # which can often be confusing to new developers. # This output is suppressed by default but can be re-enabled by #suppressLogOutputDuringTests=false suppressLogOutputDuringTests=true + Modified: jakarta/commons/proper/digester/trunk/build.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/digester/trunk/build.xml?view=diff&rev=557397&r1=557396&r2=557397 ============================================================================== --- jakarta/commons/proper/digester/trunk/build.xml (original) +++ jakarta/commons/proper/digester/trunk/build.xml Wed Jul 18 14:11:26 2007 @@ -276,289 +276,18 @@ <!-- ========== Unit Test Targets ========================================= --> - <target name="test" depends="compile.tests, - test.digester, - test.matching, - test.matching.extended, - test.rule, - test.callmethod, - test.objectparam, - test.bpsr, - test.spr, - test.xmlrules, - test.node, - test.factory, - test.regex, - test.wdrules, - test.plugins, - test.others, - test.substitution, - test.url - " - description="Run all unit test cases"> - </target> - - <target name="test.factory" depends="compile.tests" - description="Run tests for loading Digester rules from XML ..."> - <echo message="Running factory create tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.TestFactoryCreate"/> + <target name="test" depends="compile.tests" description="Run all unit test cases"> + <junit printsummary="true" showoutput="true" fork="yes" haltonfailure="${test.failonerror}"> <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.xmlrules" depends="compile.tests" - description="Run tests for loading Digester rules from XML ..."> - <echo message="Running xmlrules tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.xmlrules.DigesterLoaderTestSuite"/> - <classpath refid="test.classpath"/> - </java> - </target> - - - <target name="test.bpsr" depends="compile.tests" - description="Run tests for BeanPropertySetterRule ..."> - <echo message="Running BeanPropertySetterRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.BeanPropertySetterRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - - <target name="test.callmethod" depends="compile.tests" - description="Run tests for CallMethodRule and CallParamRule ..."> - <echo message="Running CallMethodRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.CallMethodRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.overlapping" depends="compile.tests" - description="Run tests for OverlappingCallMethodRule..."> - <echo message="Running OverlappingCallMethodRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.OverlappingCallMethodRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.objectparam" depends="compile.tests" - description="Run tests for ObjectParamRule ..."> - <echo message="Running ObjectParamRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.ObjectParamRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.digester" depends="compile.tests" - description="Run basic Digester unit tests ..."> - <echo message="Running basic Digester tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.DigesterTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - - <target name="test.matching" depends="compile.tests" - description="Run rule Digester test cases"> - <echo message="Running rule Digester tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.RulesBaseTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.regex" depends="compile.tests" - description="Run tests for RegexRules"> - <echo message="Running tests for RegexRules ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.RegexRulesTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.wdrules" depends="compile.tests" - description="Run tests for WithDefaultsRulesWrapper"> - <echo message="Running tests for WithDefaultsRulesWrapper ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.WDRulesWrapperTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.matching.extended" depends="compile.tests" - description="Run rule Digester extended test cases"> - <echo message="Running rule Digester tests for ExtendedBaseRules ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.EBRTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - - <target name="test.rule" depends="compile.tests" - description="Run rule Digester unit tests ..."> - <echo message="Running Rule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.RuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.spr" depends="compile.tests" - description="Run tests for SetPropertyRule ..."> - <echo message="Running SetPropertyRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.SetPropertyRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.SetPropertiesRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - - <target name="test.node" depends="compile.tests" - description="Run NodeCreateRule tests ..."> - <echo message="Running NodeCreateRule tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.NodeCreateRuleTestCase"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.plugins" depends="compile.tests" - description="Run Plugins tests ..."> - <echo message="Running Plugins tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.plugins.TestAll"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.others" depends="compile.tests" - description="Run Other tests ..."> - <echo message="Running Other tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.TestOthers"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.substitution" depends="compile.tests" - description="Run Substitutions tests ..."> - <echo message="Running Substitutions tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.substitution.TestAll"/> - <classpath refid="test.classpath"/> - </java> - </target> - - <target name="test.url" depends="compile.tests" - description="Run Digester URL based unit tests ..."> - <echo message="Running Digester URL based tests ..."/> - <condition property="logopt" value="${log.factoryopt}=${log.class}"> - <istrue value="${suppressLogOutputDuringTests}"/> - </condition> - <java classname="${test.runner}" fork="yes" - failonerror="${test.failonerror}"> - <jvmarg value="-D${logopt}"/> - <arg value="org.apache.commons.digester.URLTestCase"/> - <classpath refid="test.classpath"/> - </java> + <batchtest> + <fileset dir="${test.home}"> + <include name="**/*TestCase.java"/> + <include name="**/*Test.java"/> + <include name="**/plugins/TestAll.java"/> + <include name="**/TestFactoryCreate.java"/> + </fileset> + </batchtest> + </junit> </target> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]