dwinterfeldt    01/08/17 09:50:32

  Modified:    contrib/validator build.xml build-test.xml
  Added:       contrib/validator build.properties.sample
  Log:
  Updated to use the commons packages.  The unit tests are not working currently.
  
  Revision  Changes    Path
  1.2       +49 -44    jakarta-struts/contrib/validator/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/validator/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 2001/07/07 05:31:18     1.1
  +++ build.xml 2001/08/17 16:50:32     1.2
  @@ -23,25 +23,44 @@
     <property name="package.example" value="com/wintecinc/struts/example/validator"/>
     <property name="package.jdbc.example" 
value="com/wintecinc/struts/example/validator/jdbc"/>
     <property name="package.test" value="com/wintecinc/test"/>
  -                                                        
  +
     <target name="prepare">
       <!-- Create the time stamp -->
       <tstamp/>
       <!-- Create the build directory structure used by compile -->
       <mkdir dir="${build}" />
     </target>
  -
  +  
  +  <property name="validator.jar.prefix" value="${name}"/>
  +  
  +  <!-- Setting Classpath -->
  +  <path id="base.classpath">
  +     <pathelement path="${servlet.jar}"/>
  +     <pathelement path="${struts.jar}"/>
  +     <pathelement path="${commons-beanutils.jar}"/>
  +     <pathelement path="${commons-collections.jar}"/>
  +     <pathelement path="${commons-digester.jar}"/>
  +     <pathelement path="${regexp.jar}"/>
  +     <pathelement path="${jdbc20ext.jar}"/>
  +  </path>
  +
  +  <path id="main.classpath">
  +     <path refid="base.classpath"/>
  +     <pathelement path="${cactus.jar}"/>
  +     <pathelement path="${dist}/${validator.jar.prefix}-${DSTAMP}.jar" />
  +  </path>
  +
  +  <path id="javadoc.classpath">
  +     <path refid="main.classpath"/>
  +     <pathelement location="${xerces.jar}"/>
  +  </path>
  +                                                            
     <target name="compile" depends="prepare">
       <!-- Compile the java code from ${src} into ${build} -->
       <javac srcdir="${src}/${share}" 
              destdir="${build}"
              excludes="${package.example}/**">
  -       <classpath>
  -          <pathelement path="${servlet.jar}"/>
  -          <fileset dir="lib">
  -             <include name="**/*.jar" />
  -          </fileset>
  -       </classpath>      
  +       <classpath refid="base.classpath" />
       </javac>
     </target>
   
  @@ -51,7 +70,7 @@
   
       <!-- Put everything in ${build} into the Editor-${DSTAMP}.jar file -->
       <!-- <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}" /> 
-->
  -    <jar jarfile="${dist}/${name}-${DSTAMP}.jar" 
  +    <jar jarfile="${dist}/${validator.jar.prefix}-${DSTAMP}.jar" 
            basedir="${build}" 
            includes="${package.root}/**"
            excludes="${package.example}/**,${package.test}/"/>
  @@ -61,26 +80,13 @@
       <!-- Compile the java code from ${src}/${example} into ${build} -->
       <javac srcdir="${src}/${example}" 
              destdir="${build}">
  -       <classpath>
  -          <pathelement path="${servlet.jar}"/>
  -          <pathelement location="${cactus.jar}"/>
  -          <pathelement path="${dist}/${name}-${DSTAMP}.jar" />
  -          <fileset dir="lib">
  -             <include name="**/*.jar" />
  -          </fileset>
  -       </classpath>      
  +       <classpath refid="main.classpath" />
       </javac>
   
       <!-- Compile the java code from ${src}/${jdbc.example} into ${build} -->
       <javac srcdir="${src}/${jdbc.example}" 
              destdir="${build}">
  -       <classpath>
  -          <pathelement path="${servlet.jar}"/>
  -          <pathelement path="${dist}/${name}-${DSTAMP}.jar" />
  -          <fileset dir="lib">
  -             <include name="**/*.jar" />
  -          </fileset>
  -       </classpath>      
  +       <classpath refid="main.classpath" />
       </javac>
   
     </target>
  @@ -103,31 +109,40 @@
        <copy todir="${web}/${example}/WEB-INF/tlds" >
          <fileset dir="${dist}" 
                   includes="struts-validator.tld"/>
  +       <fileset dir="${struts.tlds}">
  +          <include name="*.tld" />
  +       </fileset>
        </copy>
   
        <copy todir="${web}/${jdbc.example}/WEB-INF/tlds" >
          <fileset dir="${dist}" 
                   includes="struts-validator.tld"/>
  +       <fileset dir="${struts.tlds}">
  +          <include name="*.tld" />
  +       </fileset>
        </copy>
   
     </target>
       
     <target name="war" depends="copy_example">
  +    <mkdir dir="${webapps}" />
  +     
  +    <mkdir dir="lib" />
  +    <copy file="${struts.jar}" todir="lib"/>
  +    <copy file="${commons-beanutils.jar}" todir="lib"/>
  +    <copy file="${commons-collections.jar}" todir="lib"/>
  +    <copy file="${commons-digester.jar}" todir="lib"/>
  +    <copy file="${regexp.jar}" todir="lib"/>
       
       <war warfile="${webapps}/validator.war" 
webxml="${web}/${example}/WEB-INF/web.xml">
         <fileset dir="${web}/${example}">
            <include name="**/**" />
            <exclude name="WEB-INF/web.xml" />
         </fileset>
  -      <fileset dir="struts">
  -         <include name="**/**" />
  -      </fileset>
  -      <lib dir="lib">
  -        <exclude name="jdbc2_0-stdext.jar" />
  -      </lib>
         <lib dir="${dist}">
  -         <include name="${name}-${DSTAMP}.jar" />
  +         <include name="${validator.jar.prefix}-${DSTAMP}.jar" />
         </lib>
  +      <lib dir="lib" />
         <classes dir="${build}">
            <include name="${package.example}/**" />
            <include name="${package.test}/" />
  @@ -138,15 +153,10 @@
         <fileset dir="${web}/${jdbc.example}">
            <include name="**/**" />
            <exclude name="WEB-INF/web.xml" />
  -      </fileset>
  -      <fileset dir="struts">
  -         <include name="**/**" />
         </fileset>
  -      <lib dir="lib">
  -        <exclude name="jdbc2_0-stdext.jar" />
  -      </lib>
  +      <lib dir="lib" />
         <lib dir="${dist}">
  -         <include name="${name}-${DSTAMP}.jar" />
  +         <include name="${validator.jar.prefix}-${DSTAMP}.jar" />
         </lib>
         <classes dir="${build}">
            <include name="${package.jdbc.example}/**" />
  @@ -166,12 +176,7 @@
                version="true"
                windowtitle="${title} API"
                doctitle="${title}">
  -       <classpath>
  -          <pathelement path="${servlet.jar}"/>
  -          <fileset dir="lib">
  -             <include name="**/*.jar" />
  -          </fileset>
  -       </classpath>    
  +       <classpath refid="javadoc.classpath" />
       </javadoc>
     </target>
   
  
  
  
  1.2       +27 -15    jakarta-struts/contrib/validator/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/validator/build-test.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-test.xml    2001/07/07 05:31:18     1.1
  +++ build-test.xml    2001/08/17 16:50:32     1.2
  @@ -1,8 +1,33 @@
   <project name="Struts Unit Tests" default="compile" basedir=".">
   
  +    <path id="test.classpath">
  +       <!-- base.classpath -->
  +       <pathelement path="${servlet.jar}"/>
  +       <pathelement path="${struts.jar}"/>
  +       <!--
  +       <pathelement path="${commons-beanutils.jar}"/>
  +       <pathelement path="${commons-collections.jar}"/>
  +       <pathelement path="${commons-digester.jar}"/>
  +       <pathelement path="${regexp.jar}"/>
  +       <pathelement path="${jdbc20ext.jar}"/>
  +       -->
  +    
  +       <!-- main.classpath -->
  +       <pathelement path="${cactus.jar}"/>
  +       <pathelement path="${dist}/${validator.jar.prefix}-${DSTAMP}.jar" />
  +    
  +       <pathelement location="${junit.jar}"/>
  +    
  +       <!-- For cactus.properties -->
  +       <pathelement location="conf/test"/>
  +    
  +       <!-- Why do I need Ant here? -->
  +       <pathelement location="${ant.jar}"/>
  +       <pathelement location="${ant.optional.jar}"/>
  +    </path>
  +
       <!-- Global test initialization - independent of Server type -->
       <target name="init">
  -        <property name="struts.jar" value="${build.home}/library/${app.name}.jar" />
           <property name="server.root" value="${basedir}/test" />
           <property name="test.conf" value="conf/test/tomcat" />
           <property name="test.root" value="test" />
  @@ -160,20 +185,7 @@
       <target name="tests" depends="">
   
           <junit printsummary="yes" haltonfailure="yes" fork="yes">
  -            <classpath>
  -                <pathelement location="${servlet.jar}"/>
  -                <pathelement location="${struts.jar}"/>
  -                <pathelement location="${junit.jar}"/>
  -                <pathelement location="${cactus.jar}"/>
  -                <pathelement location="${build}"/>
  -                
  -                <!-- For cactus.properties -->
  -                <pathelement location="conf/test"/>
  -                
  -                <!-- Why do I need Ant here? -->
  -                <pathelement location="${ant.jar}"/>
  -                <pathelement location="${ant.optional.jar}"/>
  -            </classpath>
  +            <classpath refid="test.classpath" />
   
               <formatter type="plain" usefile="false"/>
   
  
  
  
  1.1                  jakarta-struts/contrib/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
  struts.jar=../../target/library/struts.jar
  struts.tlds=../../target/library
  
commons-beanutils.jar=c:/projects/jakarta-struts/target/library/commons-beanutils.jar
  
commons-collections.jar=c:/projects/jakarta-struts/target/library/commons-collections.jar

  commons-digester.jar=c:/projects/jakarta-struts/target/library/commons-digester.jar
  servlet.jar=c:/tomcat3/lib/servlet.jar
  jdbc20ext.jar=c:/tomcat4/lib/jdbc2_0-stdext.jar
  regexp.jar=c:/software/jakarta-regexp/jakarta-regexp-1.2.jar
  xerces.jar=c:/software/xerces/xerces.jar
  cactus.jar=c:/software/cactus/lib/commons-cactus.jar
  cactus.ant.jar=c:/software/cactus/lib/commons-cactus-ant.jar
  junit.jar=c:/software/junit3.5/junit.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 = c:/tomcat3
  tomcat.home.40 = c:/tomcat4
  
  
  
  

Reply via email to