commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tur...@apache.org
Subject cvs commit: jakarta-commons/validator build.xml
Date Thu, 10 Oct 2002 23:56:27 GMT
turner      2002/10/10 16:56:27

  Modified:    validator build.xml
  Log:
  Added build targets for "build-example" and "example"
  
  Revision  Changes    Path
  1.9       +175 -145  jakarta-commons/validator/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml	19 Jul 2002 03:09:06 -0000	1.8
  +++ build.xml	10 Oct 2002 23:56:27 -0000	1.9
  @@ -1,145 +1,175 @@
  -<!--
  -   You will need Ant setup properly to run this script.  The "build.properties.sample"
file 
  -   will need to be edited to point to some jar files and renamed to "build.properties".
  --->
  -<project name="Commons Validator" default="jar" basedir=".">
  -   <!-- set global properties for this build -->
  -   <property file="build.properties"/>
  -   <property file="../build.properties"/>
  -   <property file="${user.home}/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="${commons-logging.jar}"/>
  -      <pathelement path="${oro.jar}"/>
  -   </path>
  -   
  -   <path id="test.classpath">
  -      <path refid="base.classpath"/>
  -      <pathelement path="${junit.jar}"/>
  -      <pathelement location="${xerces.jar}"/>
  -      <pathelement path="${commons-beanutils.jar}"/>
  -      <pathelement path="${commons-collections.jar}"/>
  -      <pathelement path="${commons-digester.jar}"/>
  -      <pathelement path="${commons-logging.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="init" description="creates any directories needed by the build process">
  -      <!-- Create the time stamp -->
  -      <tstamp/>
  -      <!-- Create the build directory structure used by compile -->
  -      <mkdir dir="${build}/${share}"/>
  -   </target>
  -
  -   <!-- Compile shared source -->
  -   <target name="build" depends="init" description="builds binary distribution">
  -      <!-- Compile the java code from ${src}/${share} into ${build}/${share} -->
  -      <javac srcdir="${src}/${share}" 
  -             destdir="${build}/${share}">
  -         <classpath refid="base.classpath" />
  -      </javac>
  -   </target>
  -   
  -   <!-- Create distribution jar of shared source -->
  -   <target name="jar" depends="build" description="creates distributable jar of the
binaries">
  -      <!-- Create the ${dist} directory -->
  -      <mkdir dir="${dist}" />
  -      
  -      <!-- Put everything in ${build} -->
  -      <jar jarfile="${dist}/${validator.jar}" 
  -           basedir="${build}/${share}"
  -           includes="${package.root}/**"/>
  -   </target>
  -   
  -   <!-- Create Javadocs -->
  -   <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>
  -
  -   <!-- Create distribution -->
  -   <target name="dist" depends="jar,javadocs" description="creates complete distribution">
  -      <!-- Create the ${dist} directory -->
  -      <mkdir dir="${dist}" />
  -      
  -      <copy todir="${dist}" file="../LICENSE"/>
  -   </target>
  -      
  -   <!-- Clean build and dist directories -->
  -   <target name="clean"
  -    description="Clean build and distribution directories">
  -      <delete dir="${build}"/>
  -      <delete dir="${dist}"/>
  -   </target>
  -
  -   <!-- Compile JUnit Tests -->
  -   <target name="build-test" depends="jar" description="builds binaries for testing">
  -      <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>
  -
  -      <copy todir="${build}/${test}" >
  -         <fileset dir="${src}/${test}"
  -                  excludes="**/*.java" 
  -         />
  -      </copy>
  -   </target>
  -
  -   <!-- Run JUnit Tests -->
  -   <target name="test" depends="build-test" description="runs junit tests">
  -      <java fork="yes" classname="junit.textui.TestRunner" 
  -          taskname="junit" failonerror="true">
  -          <arg value="org.apache.commons.validator.ValidatorTestSuite"/>
  -          <classpath refid="test.classpath" />
  -      </java>
  -   </target>
  -
  -   <!-- Run JUnit Tests for Email only -->
  -   <target name="test.email"
  -        depends="build-test" description="runs email tests">
  -      <java fork="yes" classname="junit.textui.TestRunner" 
  -          taskname="junit" failonerror="true">
  -          <arg value="org.apache.commons.validator.EmailTest"/>
  -          <classpath refid="test.classpath" />
  -      </java>
  -   </target>
  -
  -
  -      
  -</project>
  -
  +<!--
  +   You will need Ant setup properly to run this script.  The "build.properties.sample"
file 
  +   will need to be edited to point to some jar files and renamed to "build.properties".
  +-->
  +<project name="Commons Validator" default="jar" basedir=".">
  +   <!-- set global properties for this build -->
  +   <property file="build.properties"/>
  +   <property file="../build.properties"/>
  +   <property file="${user.home}/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="example" value="example" />
  +   <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="${commons-logging.jar}"/>
  +      <pathelement path="${oro.jar}"/>
  +   </path>
  +   
  +   <path id="test.classpath">
  +      <path refid="base.classpath"/>
  +      <pathelement path="${junit.jar}"/>
  +      <pathelement location="${xerces.jar}"/>
  +      <pathelement path="${commons-beanutils.jar}"/>
  +      <pathelement path="${commons-collections.jar}"/>
  +      <pathelement path="${commons-digester.jar}"/>
  +      <pathelement path="${commons-logging.jar}"/>
  +      <pathelement path="${dist}/${validator.jar}" />
  +      <pathelement path="${build}/${test}" />
  +   </path>
  +
  +   <path id="example.classpath">
  +      <path refid="test.classpath"/>
  +      <pathelement path="${build}/${example}" />
  +   </path>
  +   
  +   <path id="javadoc.classpath">
  +      <path refid="base.classpath"/>
  +      <pathelement location="${xerces.jar}"/>
  +      <pathelement path="${dist}/${validator.jar}" />
  +   </path>
  +   
  +   <target name="init" description="creates any directories needed by the build process">
  +      <!-- Create the time stamp -->
  +      <tstamp/>
  +      <!-- Create the build directory structure used by compile -->
  +      <mkdir dir="${build}/${share}"/>
  +   </target>
  +
  +   <!-- Compile shared source -->
  +   <target name="build" depends="init" description="builds binary distribution">
  +      <!-- Compile the java code from ${src}/${share} into ${build}/${share} -->
  +      <javac srcdir="${src}/${share}" 
  +             destdir="${build}/${share}">
  +         <classpath refid="base.classpath" />
  +      </javac>
  +   </target>
  +   
  +   <!-- Create distribution jar of shared source -->
  +   <target name="jar" depends="build" description="creates distributable jar of the
binaries">
  +      <!-- Create the ${dist} directory -->
  +      <mkdir dir="${dist}" />
  +      
  +      <!-- Put everything in ${build} -->
  +      <jar jarfile="${dist}/${validator.jar}" 
  +           basedir="${build}/${share}"
  +           includes="${package.root}/**"/>
  +   </target>
  +   
  +   <!-- Create Javadocs -->
  +   <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>
  +
  +   <!-- Create distribution -->
  +   <target name="dist" depends="jar,javadocs" description="creates complete distribution">
  +      <!-- Create the ${dist} directory -->
  +      <mkdir dir="${dist}" />
  +      
  +      <copy todir="${dist}" file="../LICENSE"/>
  +   </target>
  +      
  +   <!-- Clean build and dist directories -->
  +   <target name="clean"
  +    description="Clean build and distribution directories">
  +      <delete dir="${build}"/>
  +      <delete dir="${dist}"/>
  +   </target>
  +
  +   <!-- Compile Example -->
  +   <target name="build-example" depends="jar" description="builds binaries for example">
  +      <mkdir dir="${build}/${example}"/>
  +      
  +      <!-- Compile the java code from ${src}/${example} into ${build}/${example} -->
  +      <javac srcdir="${src}/${example}" 
  +             debug="on"
  +             destdir="${build}/${example}">
  +         <classpath refid="test.classpath" />
  +      </javac>
  +
  +      <copy todir="${build}/${example}" >
  +         <fileset dir="${src}/${example}"
  +                  excludes="**/*.java" 
  +         />
  +      </copy>
  +   </target>
  +   <target name="example" depends="build-example" description="runs example">
  +      <java fork="yes" classname="org.apache.commons.validator.ValidateExample" 
  +          taskname="main" failonerror="true">
  +          <classpath refid="example.classpath" />
  +      </java>
  +   </target>
  +
  +   <!-- Compile JUnit Tests -->
  +   <target name="build-test" depends="jar" description="builds binaries for testing">
  +      <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>
  +
  +      <copy todir="${build}/${test}" >
  +         <fileset dir="${src}/${test}"
  +                  excludes="**/*.java" 
  +         />
  +      </copy>
  +   </target>
  +
  +   <!-- Run JUnit Tests -->
  +   <target name="test" depends="build-test" description="runs junit tests">
  +      <java fork="yes" classname="junit.textui.TestRunner" 
  +          taskname="junit" failonerror="true">
  +          <arg value="org.apache.commons.validator.ValidatorTestSuite"/>
  +          <classpath refid="test.classpath" />
  +      </java>
  +   </target>
  +
  +   <!-- Run JUnit Tests for Email only -->
  +   <target name="test.email"
  +        depends="build-test" description="runs email tests">
  +      <java fork="yes" classname="junit.textui.TestRunner" 
  +          taskname="junit" failonerror="true">
  +          <arg value="org.apache.commons.validator.EmailTest"/>
  +          <classpath refid="test.classpath" />
  +      </java>
  +   </target>
  +
  +
  +      
  +</project>
  +
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message