You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by fe...@apache.org on 2006/04/15 06:20:24 UTC

svn commit: r394252 - in /jakarta/cactus/trunk: ./ framework/src/test/eclipse/org/apache/cactus/ integration/ant/src/java/org/apache/cactus/integration/ant/ integration/ant/src/test/org/apache/cactus/integration/ant/ integration/maven/

Author: felipeal
Date: Fri Apr 14 21:20:17 2006
New Revision: 394252

URL: http://svn.apache.org/viewcvs?rev=394252&view=rev
Log:
CACTUS-151: updated Cargo dependency to release 0.8

Added:
    jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/EclipseTestAll.java
    jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/EclipseTestAll.java
      - copied, changed from r394240, jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/TestAllOnEclipse.java
Removed:
    jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/TestAllOnEclipse.java
    jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/TestAllOnEclipse.java
Modified:
    jakarta/cactus/trunk/.classpath
    jakarta/cactus/trunk/build.properties.default
    jakarta/cactus/trunk/dependencies.xml.default
    jakarta/cactus/trunk/download.xml
    jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java
    jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyWarTask.java
    jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java
    jakarta/cactus/trunk/integration/maven/project.xml

Modified: jakarta/cactus/trunk/.classpath
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/.classpath?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/.classpath (original)
+++ jakarta/cactus/trunk/.classpath Fri Apr 14 21:20:17 2006
@@ -28,7 +28,7 @@
 	<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jetty-4.2.17.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/>
-	<classpathentry kind="var" path="MAVEN_REPO/cargo/jars/cargo-0.8.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/cargo/jars/cargo-core-uberjar-0.8.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/aspectj/jars/aspectjrt-1.2.1.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-core-0.09.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/httpunit/jars/httpunit-1.6.jar"/>
@@ -40,5 +40,6 @@
 	<classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xmlParserAPIs-2.6.2.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/clover/jars/clover-ant-1.3_01.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-1.4-rc4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/cargo/jars/cargo-ant-0.8.jar"/>
 	<classpathentry kind="output" path="integration/ant/target-13/classes/test"/>
 </classpath>

Modified: jakarta/cactus/trunk/build.properties.default
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/build.properties.default?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/build.properties.default (original)
+++ jakarta/cactus/trunk/build.properties.default Fri Apr 14 21:20:17 2006
@@ -226,8 +226,9 @@
 # The location of the Hmlunit jar
 htmlunit.jar = ${lib.repo}/${htmlunit.project}/jars/${htmlunit.artifact}-${htmlunit.version}.jar
 
-# The location of the Cargo jar
+# The location of the Cargo jars
 cargo.jar = ${lib.repo}/${cargo.project}/jars/${cargo.artifact}-${cargo.version}.jar
+cargo-ant.jar = ${lib.repo}/${cargo-ant.project}/jars/${cargo-ant.artifact}-${cargo-ant.version}.jar
 
 # Neko HTML (required by HttpUnit)
 nekohtml.jar = ${lib.repo}/${nekohtml.project}/jars/${nekohtml.artifact}-${nekohtml.version}.jar

Modified: jakarta/cactus/trunk/dependencies.xml.default
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/dependencies.xml.default?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/dependencies.xml.default (original)
+++ jakarta/cactus/trunk/dependencies.xml.default Fri Apr 14 21:20:17 2006
@@ -9,8 +9,13 @@
       artifact="aspectjrt" version="1.2.1"/>
   <aspectj-tools project="aspectj"
       artifact="aspectjtools" version="1.2.1"/>
+  <!-- TODO: remove URL once cargo is available on ibiblio -->
   <cargo project="cargo"
-      artifact="cargo" version="0.8"/>
+      artifact="cargo-core-uberjar" version="0.8"
+      url="http://cargo.codehaus.org/dist2/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar"/>
+  <cargo-ant project="cargo"
+      artifact="cargo-ant" version="0.8"
+      url="http://cargo.codehaus.org/dist2/org/codehaus/cargo/cargo-ant/0.8/cargo-ant-0.8.jar"/>     
   <checkstyle project="checkstyle"
       artifact="checkstyle" version="3.4"/>
   <clover project="clover"

Modified: jakarta/cactus/trunk/download.xml
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/download.xml?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/download.xml (original)
+++ jakarta/cactus/trunk/download.xml Fri Apr 14 21:20:17 2006
@@ -68,27 +68,49 @@
       </antcall>
     </sequential>
   </macrodef>
-
+	
   <!-- This macro will download a single jar from ${repo.url} -->
   <macrodef name="download.jar">
     <attribute name="jar"/>
     <sequential>
+      <property name="url" 
+      	  value="${repo.url}/${@{jar}.project}/jars/${@{jar}.artifact}-${@{jar}.version}.jar"/>
+      <download.jar.from.url jar="${jar}" url="${url}"/>
+    </sequential>
+  </macrodef>
+
+  <!-- This macro will download a single jar from ${url} -->
+  <macrodef name="download.jar.from.url">
+    <attribute name="jar"/>
+    <attribute name="url"/>
+    <sequential>
       <property name="@{jar}.name"
           value="${@{jar}.artifact}-${@{jar}.version}.jar"/>
       <dirname property="@{jar}.dir" file="${@{jar}.jar}"/>
       <mkdir dir="${@{jar}.dir}"/>
       <echo message="Updating [${@{jar}.jar}]"/>
-      <get src="${repo.url}/${@{jar}.project}/jars/${@{jar}.name}"
+      <get src="${url}"
           dest="${@{jar}.jar}" usetimestamp="yes" ignoreerrors="yes"/>
       <echo message=""/>
     </sequential>
   </macrodef>
+	
+	
+  <!-- Sets the url property from the project's specific url -->	
+  <macrodef name="setUrl">
+    <attribute name="jar"/>
+    <sequential>
+    	<property name="url" value="${@{jar}.url}"/>
+    </sequential>
+  </macrodef>
+	
 
   <!-- Defines the property jar.present if the jar passed as parameter is 
        available on the local filesystem -->
   <macrodef name="verify">
     <attribute name="jar"/>
     <sequential>
+      <echo message="Checking if file ${@{jar}.jar} is present"/>
       <available file="${@{jar}.jar}" property="jar.present"/>
     </sequential>
   </macrodef>
@@ -109,6 +131,7 @@
     <download jar="aspectjrt"/>
     <download jar="aspectj-tools"/>
     <download jar="cargo"/>
+    <download jar="cargo-ant"/>
     <download jar="checkstyle"/>
     <download jar="clover"/>
     <download jar="commons.beanutils"/>
@@ -135,10 +158,6 @@
     <download jar="standard"/>
     <download jar="xerces"/>
     <download jar="xmlapis"/>
-
-    <!-- TODO: Add download of xalan for users who are building on 
-         JDK < 1.4+ -->
-
   </target>
 
   <!-- Targets to decide whether to download the jar. It verifies first if it 
@@ -151,10 +170,20 @@
   <target name="download.jar.present" if="jar.present">
     <echo>[${jar}] jar is already available</echo>
   </target>    
-  <target name="download.jar.notpresent" unless="jar.present">
+  <target name="download.set.default.url" unless="${jar}.url">
+  	<echo message="Downloading from default repository"/>
     <download.jar jar="${jar}"/>
+  </target>
+  <target name="download.set.other.url" if="${jar}.url">
+  	<setUrl jar="${jar}"/>
+  	<echo message="Downloading from specific url: ${url}"/>
+    <download.jar.from.url jar="${jar}" url="${url}"/>
+  </target>
+  <target name="set.url.and.download" depends="download.set.default.url,download.set.other.url"/>
+  <target name="download.jar.notpresent" unless="jar.present">
+   	<antcall target="set.url.and.download"/>
   </target>    
   <target name="download.jar" 
       depends="verify.jar,download.jar.present,download.jar.notpresent"/>
-
+  	
 </project>

Added: jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/EclipseTestAll.java
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/EclipseTestAll.java?rev=394252&view=auto
==============================================================================
--- jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/EclipseTestAll.java (added)
+++ jakarta/cactus/trunk/framework/src/test/eclipse/org/apache/cactus/EclipseTestAll.java Fri Apr 14 21:20:17 2006
@@ -0,0 +1,50 @@
+/* 
+ * ========================================================================
+ * 
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ========================================================================
+ */
+package org.apache.cactus;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+/**
+ * Class used to run all tests under Eclipse.
+ *
+ * @version $Id: $
+ */
+public class EclipseTestAll
+{
+  /**
+   * Sets the testinput.dir property and calls TestAll.suite()
+   * @return a test suite (<code>TestSuite</code>) that includes all methods
+   *         starting with "test"
+   * @throws Exception prpagated from TestShareAll.suite()
+   */
+  public static Test suite() throws Exception
+  {
+    final String inputDir = System.getProperty("testinput.dir");
+    if (inputDir == null) 
+    {
+      final File dir = new File("./src/test-input");
+      final String path = dir.getAbsolutePath();
+      System.setProperty("testinput.dir", path);
+    }
+    return TestShareAll.suite();
+  }
+}

Modified: jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java (original)
+++ jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyEarTask.java Fri Apr 14 21:20:17 2006
@@ -259,7 +259,8 @@
                 String module = (String) ejbModules.next();
                 EjbArchive ejbArchive = ear.getEjbModule(module);
                 EjbJarXml descr = ejbArchive.getEjbJarXml();
-                VendorEjbDescriptor vendorDescr = descr.getVendorDescriptor();
+                VendorEjbDescriptor vendorDescr = 
+                  (VendorEjbDescriptor) descr.getVendorDescriptor();
                 if (vendorDescr == null)
                 {
                     throw new BuildException("Failed to find vendor " 

Modified: jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyWarTask.java
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyWarTask.java?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyWarTask.java (original)
+++ jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/CactifyWarTask.java Fri Apr 14 21:20:17 2006
@@ -43,7 +43,7 @@
 import org.codehaus.cargo.module.webapp.WebXmlIo;
 import org.codehaus.cargo.module.webapp.WebXmlMerger;
 import org.codehaus.cargo.module.webapp.WebXmlVersion;
-import org.codehaus.cargo.util.monitor.AntMonitor;
+import org.codehaus.cargo.util.log.AntLogger;
 import org.xml.sax.SAXException;
 
 /**
@@ -776,7 +776,7 @@
                 WebXml parsedMergeWebXml = WebXmlIo.parseWebXmlFromFile(
                     this.mergeWebXml, this.xmlCatalog);
                 WebXmlMerger merger = new WebXmlMerger(theWebXml);
-                merger.setMonitor(new AntMonitor(this));
+                merger.setLogger(new AntLogger(this));
                 merger.merge(parsedMergeWebXml);
             }
             catch (IOException e)

Modified: jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java (original)
+++ jakarta/cactus/trunk/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java Fri Apr 14 21:20:17 2006
@@ -31,7 +31,7 @@
 import org.codehaus.cargo.module.webapp.WebXml;
 import org.codehaus.cargo.module.webapp.WebXmlIo;
 import org.codehaus.cargo.module.webapp.WebXmlMerger;
-import org.codehaus.cargo.util.monitor.AntMonitor;
+import org.codehaus.cargo.util.log.AntLogger;
 import org.xml.sax.SAXException;
 
 /**
@@ -115,9 +115,9 @@
                     WebXml mergeWebXml = WebXmlIo.parseWebXmlFromFile(
                         this.mergeFile, this.xmlCatalog);
                     WebXmlMerger merger = new WebXmlMerger(srcWebXml);
-                    merger.setMonitor(new AntMonitor(this));
+                    merger.setLogger(new AntLogger(this));
                     merger.merge(mergeWebXml);
-                    WebXmlIo.writeWebXml(srcWebXml, this.destFile,
+                    WebXmlIo.writeDescriptor(srcWebXml, this.destFile,
                         this.encoding, this.indent);
                 }
                 else

Copied: jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/EclipseTestAll.java (from r394240, jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/TestAllOnEclipse.java)
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/EclipseTestAll.java?p2=jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/EclipseTestAll.java&p1=jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/TestAllOnEclipse.java&r1=394240&r2=394252&rev=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/TestAllOnEclipse.java (original)
+++ jakarta/cactus/trunk/integration/ant/src/test/org/apache/cactus/integration/ant/EclipseTestAll.java Fri Apr 14 21:20:17 2006
@@ -28,7 +28,7 @@
  *
  * @version $Id: $
  */
-public class TestAllOnEclipse 
+public class EclipseTestAll
 {
   
   /**

Modified: jakarta/cactus/trunk/integration/maven/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/cactus/trunk/integration/maven/project.xml?rev=394252&r1=394251&r2=394252&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/maven/project.xml (original)
+++ jakarta/cactus/trunk/integration/maven/project.xml Fri Apr 14 21:20:17 2006
@@ -60,8 +60,9 @@
     <!-- Cactus now depends on Cargo -->
     <dependency>
       <groupId>cargo</groupId>
-      <artifactId>cargo</artifactId>
-      <version>0.6</version>
+      <artifactId>cargo-core-uberjar</artifactId>
+      <version>0.8</version>
+      <url>###GO TO ../.. (or ..\..) and run 'ant -f downloads.xml'###</url>
     </dependency>
 
     <!-- Note: Dependencies below are needed by HttpUnit. Xerces is also



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