You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2006/03/28 05:10:05 UTC

svn commit: r389377 - in /struts/shale/trunk: build.properties.sample test-framework/build.xml use-cases/build.xml

Author: craigmcc
Date: Mon Mar 27 19:10:03 2006
New Revision: 389377

URL: http://svn.apache.org/viewcvs?rev=389377&view=rev
Log:
*Partial* fix for issue 38627 (undefined "htmlunit.home" breaks the build)
by changing the way that HtmlUnit is autodetected in test-framework/build.xml
(which was where the failure occurred).  You should now be able to do an
"ant clean release test" from the top level directory without setting
htmlunit.home -- although you'll want to review the changes to
build.properties.sample if you *do* have HtmlUnit available.

Also modified the use-cases/build.xml script to only compile and execute
system tests only if HtmlUnit is present.  These changes have to be propogated
to the other webapp build scripts before the issue can be closed.

PR:  Bugzilla #38627
Submitted By:  Dennis C. Byrnne <dennis AT dbyrne.net>

Modified:
    struts/shale/trunk/build.properties.sample
    struts/shale/trunk/test-framework/build.xml
    struts/shale/trunk/use-cases/build.xml

Modified: struts/shale/trunk/build.properties.sample
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/build.properties.sample?rev=389377&r1=389376&r2=389377&view=diff
==============================================================================
--- struts/shale/trunk/build.properties.sample (original)
+++ struts/shale/trunk/build.properties.sample Mon Mar 27 19:10:03 2006
@@ -78,3 +78,11 @@
 
 # (Optional) The path to a Tomcat 5.0.x installation
 tomcat50.home=c:/java/jakarta-tomcat-5.0.28
+
+# (Optional) The following three declarations must be declared and updated
+# together, whenever we switch versions of HtmlUnit.  The following defaults
+# reflect HtmlUnit 1.6 (which is the currently expected version).
+htmlunit.home=/usr/local/htmlunit-1.6
+htmlunit.jar=htmlunit-1.6.jar
+commons-httpclient.jar=httpclient-3.0-rc2.jar
+

Modified: struts/shale/trunk/test-framework/build.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/test-framework/build.xml?rev=389377&r1=389376&r2=389377&view=diff
==============================================================================
--- struts/shale/trunk/test-framework/build.xml (original)
+++ struts/shale/trunk/test-framework/build.xml Mon Mar 27 19:10:03 2006
@@ -80,8 +80,8 @@
     <pathelement location="${shale-core.jar}"/>
     <pathelement location="${build.home}/classes"/>
     <pathelement location="${junit.jar}"/>
-    <fileset          dir="${htmlunit.home}/lib"
-                 includes="htmlunit*.jar commons-httpclient*.jar"/>
+    <pathelement location="${htmlunit.jar}"/>
+    <pathelement location="${commons-httpclient.jar}"/>
   </path>
 
 
@@ -92,7 +92,7 @@
   </path>
 
 
-    <!-- ==================== Maintenance Targets ============================ -->
+  <!-- ==================== Maintenance Targets ============================ -->
 
 
   <target     name="clean"

Modified: struts/shale/trunk/use-cases/build.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/build.xml?rev=389377&r1=389376&r2=389377&view=diff
==============================================================================
--- struts/shale/trunk/use-cases/build.xml (original)
+++ struts/shale/trunk/use-cases/build.xml Mon Mar 27 19:10:03 2006
@@ -114,14 +114,17 @@
 
   <!-- System Integration Test Classpath -->
   <path id="systest.classpath">
-    <fileset          dir="${htmlunit.home}/lib"
-                 includes="*.jar"/>
-    <pathelement location="${junit.jar}"/>
+    <path           refid="test.classpath"/>
+    <pathelement location="${htmlunit.jar}"/>
+    <pathelement location="${commons-httpclient.jar}"/>
     <pathelement location="${build.home}/systest-classes"/>
   </path>
 
 
   <!-- Conditional Processing Flags -->
+  <available                     property="htmlunit.present"
+                                classname="com.gargoylesoftware.htmlunit.Assert"
+                             classpathref="systest.classpath"/>
   <available                     property="jsfri.present"
                                 classname="com.sun.faces.RIConstants"
                                 classpath="${jsf-impl.jar}"/>
@@ -162,6 +165,7 @@
     <echo  message="shale-core.jar =   ${shale-core.jar}"/>
     <echo  message="shale-clay.jar =   ${shale-clay.jar}"/>
     <echo  message="spring-core.jar =  ${spring-core.jar}"/>
+    <echo  message="htmlunit.present = ${htmlunit.present}"/>
     <echo  message="jsfri.present =    ${jsfri.present}"/>
     <echo  message="myfaces.present =  ${myfaces.present}"/>
     <echo  message="spring.present =   ${spring.present}"/>
@@ -487,7 +491,8 @@
   <!-- =============== System Integration Tests ============================ -->
 
 
-  <target         name="systest.compile">
+  <target         name="systest.compile"
+                    if="htmlunit.present">
 
     <mkdir         dir="${build.home}/systest-classes"/>
 
@@ -513,14 +518,20 @@
 
 
   <target name="systest" depends="systest.compile"
-   description="Execute system integration tests">
+   description="Execute system integration tests"
+            if="htmlunit.present">
 
     <junit         fork="yes"
            printSummary="yes"
             haltonerror="yes"
           haltonfailure="yes">
 
-      <classpath  refid="systest.classpath"/>
+      <classpath>
+        <path     refid="test.classpath"/>
+        <pathelement location="${build.home}/systest-classes"/>
+        <fileset    dir="${htmlunit.home}/lib"
+               includes="*.jar"/>
+      </classpath>
       <formatter   type="plain"
                 usefile="false"/>
       <sysproperty  key="url"



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org