commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons-sandbox/resources/src/test/org/apache/commons/resources/tests AllTests.java ConfigurationReaderTest.java FileResourcesExposer.java FileResourcesExposerFactory.java FileResourcesTest.java Test.properties WebappFileResourcesTest.java WebappResourcesManagerTest.java config-test.xml
Date Mon, 06 Jan 2003 21:09:53 GMT
craigmcc    2003/01/06 13:09:53

  Modified:    resources build.xml
               resources/src/java/org/apache/commons/resources
                        Resources.java
  Removed:     resources/src/java/org/apache/commons/resources
                        ConfigurationReader.java LocalStrings.properties
                        ResourcesBase.java ResourcesManager.java
                        XMLConfigurationReader.java
               resources/src/java/org/apache/commons/resources/file
                        FileResources.java FileResourcesFactory.java
                        LocalStrings.properties
               resources/src/java/org/apache/commons/resources/file/web
                        WebappFileResources.java
                        WebappFileResourcesFactory.java
               resources/src/java/org/apache/commons/resources/message
                        LocalStrings.properties
                        MessageResourcesFactory.java
                        PropertyMessageResources.java
                        PropertyMessageResourcesFactory.java
                        XMLMessageResources.java
                        XMLMessageResourcesFactory.java
               resources/src/java/org/apache/commons/resources/web
                        WebappResources.java WebappResourcesBase.java
                        WebappResourcesManager.java
               resources/src/test/org/apache/commons/resources/junit
                        ResourcesManagerTestCase.java
                        XMLConfigurationReaderTestCase.java
                        test-resources.xml
               resources/src/test/org/apache/commons/resources/tests
                        AllTests.java ConfigurationReaderTest.java
                        FileResourcesExposer.java
                        FileResourcesExposerFactory.java
                        FileResourcesTest.java Test.properties
                        WebappFileResourcesTest.java
                        WebappResourcesManagerTest.java config-test.xml
  Log:
  Remove Cactus-based stuff from the build.xml file, since all of the unit
  tests now run straight under JUnit.
  
  Remove the implementations that have been made obsolete by the refactoring.
  
  TODO:  Update the documentation.
  
  Revision  Changes    Path
  1.19      +21 -177   jakarta-commons-sandbox/resources/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/resources/build.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build.xml	3 Jan 2003 05:01:35 -0000	1.18
  +++ build.xml	6 Jan 2003 21:09:51 -0000	1.19
  @@ -14,10 +14,8 @@
            init            Initialize and evaluate conditionals
            javadoc         Create component Javadoc documentation
            prepare         Prepare build directory
  -         start.tomcat.4  WAR up the test webapp and deploy it on Tomcat 4.0
            static          Copy static files to build directory
  -         test            Run all unit test cases (Tomcat 4.0)
  -         test.junit      Unit Tests that require only JUnit, not Cactus
  +         test            Run all unit test cases
           
            Default target: compile
   
  @@ -34,8 +32,8 @@
   
   <!-- ========== External Dependencies ===================================== -->
   
  -  <!-- The home directory for jaxp 1.1 -->
  -  <property name="jaxp.home"               value="/usr/local/jaxp1.1"/>
  +  <!-- The home directory for the BeanUtils package -->
  +  <property name="commons-beanutils.home" value="../beanutils/dist" />
   
     <!-- The home directory for the Commons collection classes distribution -->
     <property name="commons-collections.home" value="../collections/dist"/>
  @@ -43,68 +41,38 @@
     <!-- The home directory for the Digester package -->
     <property name="commons-digester.home" value="../digester/dist" />
   
  -  <!-- The home directory for the BeanUtils package -->
  -  <property name="commons-beanutils.home" value="../beanutils/dist" />
  +  <!-- The home directory for the Discovery package -->
  +  <property name="commons-discovery.home" value="../discovery/dist" />
   
     <!-- The home directory for the Logging package -->
     <property name="commons-logging.home" value="../logging/dist" />
   
     <!-- The directory containing your binary distribution of JUnit,
  -       version 3.2 or later -->
  -  <property name="junit.home"              value="/usr/local/junit3.5" />
  -
  -  <!-- The directory containing the servlet 2.2 jar -->
  -  <property name="servlet.home"            value="/usr/local/servlet-2.3" />
  -
  -  <!-- The directory containing Cactus >= 1.4.1 -->
  -  <property name="cactus.home"             value="/usr/local/jakarta-cactus-13-1.4.1"
/>
  -
  -  <!-- The directory containing Tomcat >= 4.0 -->
  -  <property name="tomcat.4.home"             value="/usr/local/jakarta-tomcat-4.0" />
  -
  -  <!-- The manager webapp URL, username, and password for Tomcat >= 4.1 -->
  -  <property name="manager.url" value="http://localhost:8080/manager" />
  -  <property name="manager.username" value="tomcat" />
  -  <property name="manager.password" value="tomcat" />
  +       version 3.7 or later -->
  +  <property name="junit.home"              value="/usr/local/junit3.7" />
   
   
   <!-- ========== Derived Values ============================================ -->
   
   
  -  <!-- The pathname of the collections classes JAR file -->
  -  <property name="commons-collections.jar" value="${commons-collections.home}/commons-collections.jar"/>
  -
     <!-- The pathname of the beanutils JAR file -->
     <property name="commons-beanutils.jar" value="${commons-beanutils.home}/commons-beanutils.jar"/>
   
  -  <!-- The pathname of the "digester.jar" JAR file -->
  +  <!-- The pathname of the collections classes JAR file -->
  +  <property name="commons-collections.jar" value="${commons-collections.home}/commons-collections.jar"/>
  +
  +  <!-- The pathname of the digester JAR file -->
     <property name="commons-digester.jar" value="${commons-digester.home}/commons-digester.jar"
/>
   
  +  <!-- The pathname of the discovery JAR file -->
  +  <property name="commons-discovery.jar" value="${commons-discovery.home}/commons-discovery.jar"
/>
  +
     <!-- The pathname of the logging JAR file -->
     <property name="commons-logging.jar" value="${commons-logging.home}/commons-logging.jar"
/>
   
     <!-- The pathname of the "junit.jar" JAR file -->
     <property name="junit.jar"               value="${junit.home}/junit.jar"/>
   
  -  <!-- The pathname of the jaxp parser's JAR file -->
  -  <property name="jaxp.parser.jar" value="${jaxp.home}/crimson.jar" />
  -
  -  <!-- The pathname of the servlet JAR file -->
  -  <property name="servlet.jar" value="${servlet.home}/servlet.jar" />
  -
  -  <!-- The pathname of the AspectJ JAR file (from the Cactus release) -->
  -  <property name="aspectjrt.jar" value="${cactus.home}/lib/apectjrt-1.0.5.jar"/>
  -
  -  <!-- The pathname of the cactus 1.4.1 JAR file -->
  -  <property name="cactus.jar" value="${cactus.home}/lib/cactus.jar" />
  -
  -  <!-- The pathname of the cactus-ant 1.4.1 JAR file -->
  -  <property name="cactus-ant.jar" value="${cactus.home}/lib/cactus-ant.jar" />
  -
  -  <!-- The pathname of the HttpClient JAR file -->
  -  <property name="httpclient.jar" value="${cactus.home}/lib/httpclient.jar" />
  -
  -
   
   <!-- ========== Component Declarations ==================================== -->
   
  @@ -116,7 +84,7 @@
     <property name="component.package"       value="org.apache.commons.resources"/>
   
     <!-- The title of this component -->
  -  <property name="component.title"         value="Resource Facilities"/>
  +  <property name="component.title"         value="Resources Facilities"/>
   
     <!-- The current version number of this component -->
     <property name="component.version"       value="0.1-dev"/>
  @@ -142,10 +110,6 @@
     <!-- The base directory for the documentation -->
     <property name="doc.home"                value="src/doc"/>
   
  -  <!-- The port of the server to run the tests on -->
  -  <property name="server.port"             value="8080" />
  -
  -
   
   <!-- ========== Compiler Defaults ========================================= -->
   
  @@ -159,20 +123,14 @@
     <!-- Should Java compilations set the 'optimize' compiler option? -->
     <property name="compile.optimize"        value="true"/>
   
  -  <!-- The name of the target to used to deploy the test webapps and start the server
-->
  -  <property name="server.start.target"      value="start.tomcat.4" />
  -
  -  <!-- The name of the target used to stop the server -->
  -  <property name="server.stop.target"       value="stop.tomcat.4" />
  -
     <!-- Construct compile classpath -->
     <path id="compile.classpath">
       <pathelement location="${build.home}/classes"/>
       <pathelement location="${commons-beanutils.jar}"/>
       <pathelement location="${commons-collections.jar}"/>
       <pathelement location="${commons-digester.jar}"/>
  +    <pathelement location="${commons-discovery.jar}"/>
       <pathelement location="${commons-logging.jar}"/>
  -    <pathelement location="${servlet.jar}" />
     </path>
   
   
  @@ -183,17 +141,12 @@
     <path id="test.classpath">
       <pathelement location="${build.home}/classes"/>
       <pathelement location="${build.home}/tests"/>
  -    <pathelement location="${commons-collections.jar}"/>
  -    <pathelement location="${junit.jar}"/>
  -    <pathelement location="${build.home}/classes"/>
       <pathelement location="${commons-beanutils.jar}"/>
       <pathelement location="${commons-collections.jar}"/>
       <pathelement location="${commons-digester.jar}"/>
  +    <pathelement location="${commons-discovery.jar}"/>
       <pathelement location="${commons-logging.jar}"/>
  -    <pathelement location="${servlet.jar}" />
  -    <pathelement location="${cactus.jar}" />
  -    <pathelement location="${cactus-ant.jar}" />
  -    <pathelement location="${httpclient.jar}" />
  +    <pathelement location="${junit.jar}"/>
     </path>
   
     <!-- Should all tests fail if one does? -->
  @@ -275,93 +228,6 @@
       </copy>
     </target>
   
  -  <!-- Create the webapps in ${build.home}/webapps for the tests if necessary -->
  -  <target name="build.tests" depends="compile.tests">
  -
  -        <!-- Build the test-webapp-resource webapp -->
  -        <copy todir="${build.home}/webapps/test-webapp-resource">
  -            <fileset dir="${webapp.home}/test-webapp-resource" excludes="**/*.java"
/>
  -        </copy>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/classes">
  -            <fileset dir="${build.home}/tests" />
  -        </copy>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${httpclient.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${aspectjrt.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${cactus.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${junit.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-collections.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-digester.jar}"
/>
  -        <copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-beanutils.jar}"
/>
  -
  -        <jar jarfile="${build.home}/webapps/test-webapp-resource/WEB-INF/lib/commons-${component.name}.jar">
  -            <fileset dir="${build.home}/classes" includes="**/*" />
  -        </jar>
  -
  -        <!-- Build the test-webapp-resource war -->
  -        <jar jarfile="${build.home}/webapps/test-webapp-resource.war">
  -            <fileset dir="${build.home}/webapps/test-webapp-resource" includes="**/*"/>
  -        </jar>
  -  </target>
  -
  -  <target name="start.tomcat.4" depends="build.tests"
  -         description="WAR up the test webapp and deploy it on Tomcat 4.0">
  -
  -    <!-- Re-deploy the test-webapp-resource webapp -->
  -    <delete dir="${tomcat.4.home}/webapps/test-webapp-resource" quiet="true" />
  -    <delete file="${tomcat.4.home}/webapps/test-webapp-resource.war" />
  -
  -    <copy file="${build.home}/webapps/test-webapp-resource.war" todir="${tomcat.4.home}/webapps"
/>
  -
  -    <!-- Start the tomcat 4.0 server -->
  -
  -    <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  -
  -        <jvmarg value="-Dcatalina.home=${tomcat.4.home}"/>
  -        <arg value="start"/>
  -
  -        <classpath>
  -            <fileset dir="${tomcat.4.home}">
  -            <include name="bin/bootstrap.jar"/>
  -            <include name="server/catalina.jar"/>
  -        </fileset>
  -        </classpath>
  -    </java>
  -  </target>
  -
  -  <target name="stop.tomcat.4">
  -    <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  -
  -        <jvmarg value="-Dcatalina.home=${tomcat.4.home}"/>
  -        <arg value="stop"/>
  -
  -        <classpath>
  -            <fileset dir="${tomcat.4.home}">
  -            <include name="bin/bootstrap.jar"/>
  -            <include name="server/catalina.jar"/>
  -        </fileset>
  -        </classpath>
  -    </java>
  -  </target>
  -
  -
  -  <target name="install.tomcat.4">
  -    <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
  -    <install url="${manager.url}" username="${manager.username}"
  -        password="${manager.password}" path="/test-webapp-resource"
  -             war="file://${build.home}/webapps/test-webapp-resource"/>
  -  </target>
  -
  -  <target name="list.tomcat.4">
  -    <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
  -    <list url="${manager.url}" username="${manager.username}"
  -     password="${manager.password}"/>
  -  </target>
  -
  -  <target name="remove.tomcat.4">
  -    <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>
  -    <remove url="${manager.url}" username="${manager.username}"
  -       password="${manager.password}" path="/test-webapp-resource"/>
  -  </target>
   
     <target name="clean"
      description="Clean build and distribution directories">
  @@ -414,30 +280,8 @@
   <!-- ========== Unit Test Targets ========================================= -->
   
   
  -  <target name="test"  depends="build.tests"
  -          description="Run all unit test cases (Tomcat 4.0)" >
  -
  -    <taskdef name="runservertests"
  -             classname="org.apache.cactus.ant.RunServerTestsTask">
  -        <classpath refid="test.classpath" />
  -    </taskdef>
  -    <runservertests testURL="http://localhost:${server.port}/test-webapp-resource"
  -                    startTarget="${server.start.target}"
  -                    stopTarget="${server.stop.target}"
  -                    testTarget="test.resources" />
  -  </target>
  -
  -
  - <target name="test.resources" >
  -    <java classname="${test.runner}" fork="yes"
  -        failonerror="${test.failonerror}">
  -      <arg value="org.apache.commons.resources.tests.AllTests"/>
  -      <classpath refid="test.classpath"/>
  -    </java>
  -  </target>
  -
  -  <target name="test.junit" depends="build.tests"
  -   description="Unit Tests that require only JUnit, not Cactus">
  +  <target name="test" depends="compile.tests"
  +   description="Unit Tests that require only JUnit">
   
       <junit printsummary="yes" fork="yes"
             haltonfailure="yes" haltonerror="yes">
  
  
  
  1.7       +6 -5      jakarta-commons-sandbox/resources/src/java/org/apache/commons/resources/Resources.java
  
  Index: Resources.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/resources/src/java/org/apache/commons/resources/Resources.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Resources.java	5 Jan 2003 03:29:57 -0000	1.6
  +++ Resources.java	6 Jan 2003 21:09:51 -0000	1.7
  @@ -96,7 +96,8 @@
    * are using for the specific details of your implementation.</p>
    *
    * <p>Developers implementing {@link Resources} should extend the
  - * {@link ResourcesBase} class, and override the necessary methods,
  + * {@link org.apache.commons.resources.impl.ResourcesBase} class,
  + * and override the necessary methods,
    * to shield themselves from future changes that may occur in this interface.
    *
    * @author Mike Schachter (mschachter@hp.com)
  
  
  

--
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