Author: mrdon
Date: Thu Jun  8 22:29:39 2006
New Revision: 412937

URL: http://svn.apache.org/viewvc?rev=412937&view=rev
Log:
Removed XStream as a required dependency (still used for QuickStart), fixed ant 
build to try to compile
(compile fails due to missing JSF jars in the ivy config), changed ant build to 
use xwork 2.0 and 
compile to 1.5, minor formatting for showcase config file

Added:
    struts/action2/trunk/ant-build/ivy-tasks.properties
Modified:
    struts/action2/trunk/ant-build/ivy.xml
    
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-jsf.xml
    struts/action2/trunk/build.xml
    struts/action2/trunk/core/pom.xml
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/DebuggingInterceptor.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/PrettyPrintWriter.java

Added: struts/action2/trunk/ant-build/ivy-tasks.properties
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/ant-build/ivy-tasks.properties?rev=412937&view=auto
==============================================================================
--- struts/action2/trunk/ant-build/ivy-tasks.properties (added)
+++ struts/action2/trunk/ant-build/ivy-tasks.properties Thu Jun  8 22:29:39 2006
@@ -0,0 +1,5 @@
+ivy-configure=fr.jayasoft.ivy.ant.IvyConfigure
+ivy-resolve=fr.jayasoft.ivy.ant.IvyResolve
+ivy-retrieve=fr.jayasoft.ivy.ant.IvyRetrieve
+ivy-publish=fr.jayasoft.ivy.ant.IvyPublish
+ivy-report=fr.jayasoft.ivy.ant.IvyReport

Modified: struts/action2/trunk/ant-build/ivy.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/ant-build/ivy.xml?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- struts/action2/trunk/ant-build/ivy.xml (original)
+++ struts/action2/trunk/ant-build/ivy.xml Thu Jun  8 22:29:39 2006
@@ -67,11 +67,10 @@
         <dependency org="xjavadoc" name="xjavadoc" rev="1.1" conf="build->*"/>
 
         <!-- default -->
-        <dependency org="opensymphony" name="xwork" rev="1.2+" 
conf="default->default"/>
+        <dependency org="opensymphony" name="xwork" rev="2.0+" 
conf="default->default"/>
         <dependency org="apache" name="commons-logging" rev="1.0.4" 
conf="default->default"/>
-        <dependency org="opensymphony" name="xwork" rev="1.2+" 
conf="source->source"/>
+        <dependency org="opensymphony" name="xwork" rev="2.0+" 
conf="source->source"/>
         <dependency org="freemarker" name="freemarker" rev="2.3.4" 
conf="default->default"/>
-        <dependency org="xstream" name="xstream" rev="1.1.2" 
conf="default->default" />
 
         <!-- ajax -->
         <dependency org="dwr" name="dwr" rev="1.1-beta-3" conf="ajax->*"/>
@@ -129,7 +128,7 @@
         <dependency org="portlet-api" name="portlet-api" rev="1.0" 
conf="portlet->default"/>
 
         <!-- spring -->
-        <dependency org="opensymphony" name="xwork" rev="1.2+" 
conf="spring->spring"/>
+        <dependency org="opensymphony" name="xwork" rev="2.0+" 
conf="spring->spring"/>
 
         <!-- pico -->
         <dependency org="picocontainer" name="picocontainer" rev="1.2-RC-2" 
conf="pico->*"/>
@@ -146,7 +145,7 @@
         <dependency org="w3c" name="dom" rev="3.0" conf="xslt->*"/>
 
         <!-- tiger -->
-        <dependency org="opensymphony" name="xwork-tiger" rev="1.2+" 
conf="tiger->*"/>
+        <dependency org="opensymphony" name="xwork-tiger" rev="2.0+" 
conf="tiger->*"/>
 
         <!-- cewolf -->
         <dependency org="cewolf" name="cewolf" rev="0.12.0" conf="cewolf->*"/>

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-jsf.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-jsf.xml?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-jsf.xml
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-jsf.xml
 Thu Jun  8 22:29:39 2006
@@ -4,17 +4,17 @@
     <include file="struts-jsf.xml"/>
 
     <package name="jsf" extends="struts-default, struts-jsf" namespace="/jsf">
-               
+    
         <action name="index" 
class="org.apache.struts.action2.showcase.jsf.IndexAction">
             <interceptor-ref name="jsfStack"/>
             <result name="success" type="jsf" />
         </action>
-               
-               <action name="employee" 
class="org.apache.struts.action2.showcase.jsf.EmployeeAction">
+    
+        <action name="employee" 
class="org.apache.struts.action2.showcase.jsf.EmployeeAction">
             <interceptor-ref name="basicStack"/>
             <interceptor-ref name="jsfStack"/>
             <result name="success" type="jsf" />
-                       <result name="index" 
type="redirect-action">index</result>
+            <result name="index" type="redirect-action">index</result>
         </action>
 
     </package>

Modified: struts/action2/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/build.xml?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- struts/action2/trunk/build.xml (original)
+++ struts/action2/trunk/build.xml Thu Jun  8 22:29:39 2006
@@ -2,8 +2,8 @@
     <!-- overridden properties (must be before the import!) -->
     <!--property name="src.test" value="action/src/test"/-->
     <property name="src.xdt" value="core/src/main/xdt"/>
-    <property name="compile.version" value="1.4"/>
-    <property name="test.compile.version" value="1.4"/>
+    <property name="compile.version" value="1.5"/>
+    <property name="test.compile.version" value="1.5"/>
 
     <property name="optional.sources" 
value="org/apache/struts/action2/views/jasperreports/**, 
                                              
org/apache/struts/action2/dispatcher/multipart/PellMultiPartRequest.java,

Modified: struts/action2/trunk/core/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/pom.xml?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- struts/action2/trunk/core/pom.xml (original)
+++ struts/action2/trunk/core/pom.xml Thu Jun  8 22:29:39 2006
@@ -179,11 +179,12 @@
             <optional>true</optional>
         </dependency>
 
-        <!-- used by PrettyPrintWriter (debugging interceptor) and QuickStart 
-->
+        <!-- QuickStart -->
         <dependency>
             <groupId>xstream</groupId>
             <artifactId>xstream</artifactId>
             <version>1.1.2</version>
+            <optional>true</optional>
         </dependency>
 
         <!-- Tiles -->

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/DebuggingInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/DebuggingInterceptor.java?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/DebuggingInterceptor.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/DebuggingInterceptor.java
 Thu Jun  8 22:29:39 2006
@@ -68,7 +68,7 @@
             "com.opensymphony.xwork.", "xwork."};
     private String[] _ignoreKeys = new String[]{"application", "session",
             "parameters", "request"};
-    private HashSet ignoreKeys = new HashSet(Arrays.asList(_ignoreKeys));
+    private HashSet<String> ignoreKeys = new 
HashSet<String>(Arrays.asList(_ignoreKeys));
 
     private final static String XML_MODE = "xml";
     private final static String CONSOLE_MODE = "console";

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/PrettyPrintWriter.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/PrettyPrintWriter.java?rev=412937&r1=412936&r2=412937&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/PrettyPrintWriter.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/debugging/PrettyPrintWriter.java
 Thu Jun  8 22:29:39 2006
@@ -1,10 +1,8 @@
 package org.apache.struts.action2.interceptor.debugging;
 
-import com.thoughtworks.xstream.core.util.FastStack;
-import com.thoughtworks.xstream.core.util.QuickWriter;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-
+import java.io.PrintWriter;
 import java.io.Writer;
+import java.util.Stack;
 
 /**
  * A simple writer that outputs XML in a pretty-printed indented stream.
@@ -16,10 +14,10 @@
  * <p>This code was taken from the XStream project under the BSD license.</p>
  *
  */
-public class PrettyPrintWriter implements HierarchicalStreamWriter {
+public class PrettyPrintWriter {
 
-    private final QuickWriter writer;
-    private final FastStack elementStack = new FastStack(16);
+    private final PrintWriter writer;
+    private final Stack<String> elementStack = new Stack<String>();
     private final char[] lineIndenter;
 
     private boolean tagInProgress;
@@ -38,7 +36,7 @@
     private static final char[] CLOSE = "</".toCharArray();
 
     public PrettyPrintWriter(Writer writer, char[] lineIndenter, String 
newLine) {
-        this.writer = new QuickWriter(writer);
+        this.writer = new PrintWriter(writer);
         this.lineIndenter = lineIndenter;
         this.newLine = newLine;
     }
@@ -88,11 +86,11 @@
         writer.write('\"');
     }
 
-    protected void writeAttributeValue(QuickWriter writer, String text) {
+    protected void writeAttributeValue(PrintWriter writer, String text) {
         writeText(text);
     }
 
-    protected void writeText(QuickWriter writer, String text) {
+    protected void writeText(PrintWriter writer, String text) {
         writeText(text);
     }
 
@@ -134,7 +132,7 @@
             writer.write('/');
             readyForNewLine = false;
             finishTag();
-            elementStack.popSilently();
+            elementStack.pop();
         } else {
             finishTag();
             writer.write(CLOSE);
@@ -172,9 +170,5 @@
 
     public void close() {
         writer.close();
-    }
-
-    public HierarchicalStreamWriter underlyingWriter() {
-        return this;
     }
 }


Reply via email to