rwaldhoff    01/08/13 09:05:15

  Modified:    httpclient Tag: rlwrefactoring build.properties.sample
                        build.xml
  Log:
  + added test-nohost target
  + added compile.test-webapp target
  + added relevant properties to build.props.sample, and cleaned it up a bit
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +62 -8     jakarta-commons/httpclient/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/build.properties.sample,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- build.properties.sample   2001/08/02 16:27:21     1.4
  +++ build.properties.sample   2001/08/13 16:05:15     1.4.2.1
  @@ -1,13 +1,67 @@
  -# junit.jar - JUnit 3.2+ Classpath (see http://junit.org)
  -junit.jar=/java/junit/junit.jar
  -# jsse.jar - JSSE classes (see http://java.sun.com/products/jsse)
  +# ===================================================================
  +# Sample build.properties file
  +#
  +# Make a copy this file named "build.properties",
  +# and customize it to your environment and preferences.
  +#
  +# $Id: build.properties.sample,v 1.4.2.1 2001/08/13 16:05:15 rwaldhoff Exp $
  +# ===================================================================
  +
  +# ===================================================================
  +# Classpath Settings
  +# ===================================================================
  +
  +# A JSSE implementation (see http://java.sun.com/products/jsse):
  +# Required to compile, only needed at runtime if you're using HTTPS.
  +
   jsse.jar=/java/jsse/lib/jsse.jar
  -# jsse.jar - JSSE classes (see http://java.sun.com/products/jsse)
   jcert.jar=/java/jsse/lib/jcert.jar
  -# jsse.jar - JSSE classes (see http://java.sun.com/products/jsse)
   jnet.jar=/java/jsse/lib/jnet.jar
  -# log4j.jar - log4j classes (see http://jakarta.apache.org/log4j)
  +
  +# JUnit Version 3.2(+?) (See http://junit.org)
  +# Required to compile and run the unit tests.
  +
  +junit.jar=/java/junit/junit.jar
  +
  +# The Servlet API (See http://java.sun.com/products/servlet)
  +# Required to compile the test webapp.
  +
  +servlet.jar=/java/jakarta-tomcat/lib/servlet.jar
  +
  +# Log4J (See http://jakarta.apache.org/log4j)
  +# Required to compile, optional at runtime.
  +
   log4j.jar=/java/log4j/log4j.jar
  +
  +
  +# ===================================================================
  +# Test Properties - used to configure the test cases
  +# ===================================================================
  +
  +# httpclient.log
  +#  - indicates which log writer to use (optional)
  +
  +httpclient.log=org.apache.commons.httpclient.log.SimpleLog
  +#httpclient.log=org.apache.commons.httpclient.log.Log4JCategoryLog
  +#httpclient.log=org.apache.commons.httpclient.log.NoOpLog
  +
  +# httpclient.test.*
  +#  - various properties used to override defaults within
  +#    the JUnit tests
  +
  +# the host name for the "local" webserver
  +#httpclient.test.localHost=127.0.0.1
  +
  +# the port for the "local" webserver
  +#httpclient.test.localPort=8080
  +
  +# the context to which the test webapp is deployed
  +#httpclient.test.webappContext=httpclienttest
  +
  +# ===================================================================
  +# Build Properties
  +# ===================================================================
   
  -# httpclient.log - log writer to use
  -httpclient.log=org.apache.commons.httpclient.log.SimpleLog
  \ No newline at end of file
  +# where to build the test-webapp to
  +#test-webapp.dest=${dist.home}
  +#test-webapp.dest=/java/jakarta-tomcat-4.0-b7/webapps
  \ No newline at end of file
  
  
  
  1.6.2.1   +46 -7     jakarta-commons/httpclient/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/build.xml,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- build.xml 2001/08/02 16:27:21     1.6
  +++ build.xml 2001/08/13 16:05:15     1.6.2.1
  @@ -3,7 +3,7 @@
   
   <!--
           "HTTP Client" component of the Jakarta Commons Subproject
  -        $Id: build.xml,v 1.6 2001/08/02 16:27:21 rwaldhoff Exp $
  +        $Id: build.xml,v 1.6.2.1 2001/08/13 16:05:15 rwaldhoff Exp $
   -->
   
   
  @@ -56,6 +56,12 @@
     <!-- The base directory for unit test sources -->
     <property name="test.home"               value="src/test"/>
   
  +
  +  <property name="test-webapp.source.home"       value="src/test-webapp/src"/>
  +  <property name="test-webapp.conf.home"         value="src/test-webapp/conf"/>
  +  <property name="httpclient.test.webappContext" value="httpclienttest"/>
  +  <property name="test-webapp.dest"              value="${dist.home}"/>
  +
   <!-- ========== Compiler Defaults ========================================= -->
   
   
  @@ -91,6 +97,7 @@
       <pathelement location="${jnet.jar}"/>
       <pathelement location="${log4j.jar}"/>
       <pathelement location="${conf.home}"/>
  +    <pathelement location="${servlet.jar}"/>
     </path>
   
     <!-- Should all tests fail if one does? -->
  @@ -101,6 +108,7 @@
     <property name="test.entry" value="org.apache.commons.httpclient.TestAll"/>
     <property name="test-local.entry" 
value="org.apache.commons.httpclient.TestAllLocal"/>
     <property name="test-external.entry" 
value="org.apache.commons.httpclient.TestAllExternal"/>
  +  <property name="test-nohost.entry" 
value="org.apache.commons.httpclient.TestNoHost"/>
   
     <!-- HTTPS protocol handler, needed for HTTPS unit tests -->
     <property name="java.protocol.handler.pkgs" 
value="com.sun.net.ssl.internal.www.protocol"/>
  @@ -128,6 +136,10 @@
       <mkdir dir="${build.home}/docs"/>
       <mkdir dir="${build.home}/docs/api"/>
       <mkdir dir="${build.home}/tests"/>
  +    <mkdir dir="${test-webapp.dest}"/>
  +    <mkdir dir="${test-webapp.dest}/${httpclient.test.webappContext}"/>
  +    <mkdir dir="${test-webapp.dest}/${httpclient.test.webappContext}/WEB-INF"/>
  +    <mkdir 
dir="${test-webapp.dest}/${httpclient.test.webappContext}/WEB-INF/classes"/>
     </target>
   
   
  @@ -170,6 +182,23 @@
       </copy>
     </target>
   
  +  <target name="compile.test-webapp" depends="static"
  +   description="Compile test webapp used by unit tests">
  +    <javac  srcdir="${test-webapp.source.home}"
  +           
destdir="${test-webapp.dest}/${httpclient.test.webappContext}/WEB-INF/classes"
  +             debug="${compile.debug}"
  +       deprecation="${compile.deprecation}"
  +          optimize="${compile.optimize}">
  +      <classpath refid="test.classpath"/>
  +    </javac>
  +    <copy 
todir="${test-webapp.dest}/${httpclient.test.webappContext}/WEB-INF/classes" 
filtering="on">
  +      <fileset dir="${test-webapp.source.home}" excludes="**/*.java"/>
  +    </copy>
  +    <copy todir="${test-webapp.dest}/${httpclient.test.webappContext}/WEB-INF/" 
filtering="on">
  +      <fileset dir="${test-webapp.conf.home}"/>
  +    </copy>
  +  </target>
  +
   
     <target name="clean"
      description="Clean build and distribution directories">
  @@ -220,8 +249,8 @@
   <!-- ========== Unit Test Targets ========================================= -->
   
   
  -  <target name="test"  depends="compile.tests" if="test.entry"
  -   description="Run all unit test cases">
  +  <target name="test" depends="compile.tests" if="test.entry"
  +          description="Run all unit test cases">
         <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
           <jvmarg value="-Djava.protocol.handler.pkgs=${java.protocol.handler.pkgs}"/>
           <jvmarg value="-Dhttpclient.log=${httpclient.log}"/>
  @@ -229,9 +258,19 @@
           <classpath refid="test.classpath"/>
         </java>
     </target>
  +
  +  <target name="test-nohost" depends="compile.tests" if="test-nohost.entry"
  +          description="Run all test cases that run in the local VM only.">
  +      <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
  +        <jvmarg value="-Djava.protocol.handler.pkgs=${java.protocol.handler.pkgs}"/>
  +        <jvmarg value="-Dhttpclient.log=${httpclient.log}"/>
  +        <arg value="${test-nohost.entry}"/>
  +        <classpath refid="test.classpath"/>
  +      </java>
  +  </target>
   
  -  <target name="test-local"  depends="compile.tests" if="test-local.entry"
  -   description="Run all local unit test cases">
  +  <target name="test-local" depends="compile.tests" if="test-local.entry"
  +          description="Run all test cases that depend upon the local webserver">
         <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
           <jvmarg value="-Djava.protocol.handler.pkgs=${java.protocol.handler.pkgs}"/>
           <jvmarg value="-Dhttpclient.log=${httpclient.log}"/>
  @@ -240,8 +279,8 @@
         </java>
     </target>
   
  -  <target name="test-external"  depends="compile.tests" if="test-external.entry"
  -   description="Run all external unit test cases">
  +  <target name="test-external" depends="compile.tests" if="test-external.entry"
  +          description="Run all test cases that depend upon an external internet 
connection.">
         <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
           <jvmarg value="-Djava.protocol.handler.pkgs=${java.protocol.handler.pkgs}"/>
           <jvmarg value="-Dhttpclient.log=${httpclient.log}"/>
  
  
  

Reply via email to