dwinterfeldt 02/01/05 21:03:47
Added: validator build.xml build.properties.sample
Log:
Basic compilation and JUnit Test build script.
Revision Changes Path
1.1 jakarta-commons/validator/build.xml
Index: build.xml
===================================================================
<!--
You will need Ant setup properly and have the commons-cactus-ant.jar in the
classpath. The build.properties file
will need to be edited to point to some jar files, java.home, and the application
servers you want to
run the tests on.
-->
<project name="Commons Validator" default="jar" basedir=".">
<!-- set global properties for this build -->
<property file="build.properties"/>
<property name="title" value="Commons Validator" />
<property name="name" value="validator" />
<property name="validator.jar" value="commons-validator.jar"/>
<property name="src" value="src" />
<property name="build" value="build" />
<property name="test" value="test" />
<property name="share" value="share" />
<property name="dist" value="dist" />
<property name="docs" value="docs" />
<property name="build.javadocs" value="${dist}/${docs}/api" />
<property name="package.root" value="org/apache/commons/validator"/>
<!-- Setting Classpath -->
<path id="base.classpath">
<pathelement path="${commons-beanutils.jar}"/>
<pathelement path="${commons-collections.jar}"/>
<pathelement path="${commons-digester.jar}"/>
<pathelement path="${regexp.jar}"/>
</path>
<path id="test.classpath">
<path refid="base.classpath"/>
<pathelement path="${junit.jar}"/>
<pathelement path="${dist}/${validator.jar}" />
<pathelement path="${build}/${test}" />
</path>
<path id="javadoc.classpath">
<path refid="base.classpath"/>
<pathelement location="${xerces.jar}"/>
<pathelement path="${dist}/${validator.jar}" />
</path>
<target name="prepare">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}/${share}"/>
</target>
<target name="compile" depends="prepare">
<!-- Compile the java code from ${src}/${share} into ${build}/${share} -->
<javac srcdir="${src}/${share}"
destdir="${build}/${share}">
<classpath refid="base.classpath" />
</javac>
</target>
<target name="jar" depends="compile">
<!-- Create the ${dist}/lib directory -->
<mkdir dir="${dist}" />
<!-- Put everything in ${build} -->
<jar jarfile="${dist}/${validator.jar}"
basedir="${build}/${share}"
includes="${package.root}/**"/>
</target>
<target name="javadocs" depends="jar" description="Creates the API
documentation">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="org.apache.commons.validator.*"
sourcepath="${src}/${share}"
destdir="${build.javadocs}"
author="true"
version="true"
windowtitle="${title} API"
doctitle="${title}">
<classpath refid="javadoc.classpath" />
</javadoc>
</target>
<!-- Compile JUnit Tests -->
<target name="compile_tests" depends="jar">
<mkdir dir="${build}/${test}"/>
<!-- Compile the java code from ${src}/${test} into ${build}/${test} -->
<javac srcdir="${src}/${test}"
destdir="${build}/${test}">
<classpath refid="test.classpath" />
</javac>
</target>
<!-- Compile JUnit Tests -->
<target name="runtests" depends="compile_tests">
<java fork="yes" classname="junit.textui.TestRunner"
taskname="junit" failonerror="true">
<arg value="org.apache.commons.validator.ValidatorTest"/>
<classpath refid="test.classpath" />
</java>
</target>
</project>
1.1 jakarta-commons/validator/build.properties.sample
Index: build.properties.sample
===================================================================
# Properties related to the user's environment. This file should be provided
# for building the Cactus Sample or the properties need to be specified on
# the command line when starting Ant with the -D switch
java.home=d:/jdk1.3
commons-beanutils.jar=d:/java/lib/commons-beanutils.jar
commons-collections.jar=d:/java/lib/commons-collections.jar
commons-digester.jar=d:/java/lib/commons-digester.jar
regexp.jar=e:/software/regexp/jakarta-regexp-1.2.jar
xerces.jar=e:/software/xerces/xerces.jar
# For compile_struts task (Struts interface for Validator)
struts.jar=../../target/library/struts.jar
struts.tlds=../../target/library
servlet.jar=e:/tomcat3/lib/servlet.jar
jdbc20ext.jar=d:/java/lib/jdbc2_0-stdext.jar
# Unit Testing
junit.jar=e:/software/junit3.5/junit.jar
# Unit Testing For Struts Interface to Validator
cactus.jar=e:/software/cactus/lib/commons-cactus.jar
cactus.ant.jar=e:/software/cactus/lib/commons-cactus-ant.jar
# Shouldn't be necessary, there is a problem with my ant setup
#ant.jar=c:/software/ant/lib/ant.jar
#ant.optional.jar=c:/software/ant/lib/optional.jar
# Servlet engine locations for the tests
# Note: If you don't want to run the test on a given servlet engine, just
# comment it's home property. For example, if you don't want to run the
# tests on the Resin 1.3, comment the "resin.home.13" property.
#resin.home.13=f:/applis/resin-1.3.s010125
tomcat.home.32=e:/tomcat3
tomcat.home.40=e:/tomcat4
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>