struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mitchell <jmitch...@apache.org>
Subject Re: Maven Reorg (Was --> Re: [shale] Maven 2 build -- Help Wanted)
Date Fri, 02 Jun 2006 07:20:46 GMT
I'm also done, but I wanted to leave you guys with a couple of  
questions.

The group id for Standalone Tiles (sandbox/tiles) says  
'org.apache.struts.tiles'.  Are we waiting till Tiles moves out of  
sandbox before we change that to 'org.apache.tiles'?  I'd like to  
change it now.  Your thoughts?

shale/tiles was using 0.2-SNAPSHOT of Standalone tiles, so (locally) I:
  - made the above change to the group id
  - brought shale/tiles up to 0.3-SNAPSHOT compatibility

Below is what I still have locally (yet to be committed).  If no one  
objects, I'll commit this after work tomorrow.

((( mvn_reorg )))

Index: tiles/src/main/java/org/apache/shale/tiles/TilesViewHandler.java
===================================================================
--- tiles/src/main/java/org/apache/shale/tiles/ 
TilesViewHandler.java    (revision 411049)
+++ tiles/src/main/java/org/apache/shale/tiles/ 
TilesViewHandler.java    (working copy)
@@ -29,6 +29,7 @@
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -37,6 +38,7 @@
import org.apache.tiles.DefinitionsFactoryException;
import org.apache.tiles.NoSuchDefinitionException;
import org.apache.tiles.TilesUtil;
+import org.apache.tiles.context.servlet.ServletTilesContext;
/**
   * This view handler strips the suffix off of the view ID and looks
@@ -263,7 +265,7 @@
            ServletRequest servletRequest = (ServletRequest) request;
            ServletContext servletContext = (ServletContext) context;
            try {
-              tile = TilesUtil.getDefinition(name, servletRequest,  
servletContext);
+              tile = TilesUtil.getDefinition(name, new  
ServletTilesContext(servletContext, (HttpServletRequest) 
servletRequest));
            } catch (NoSuchDefinitionException nsex) {
                /* not here */
            } catch (DefinitionsFactoryException dex) {
Index: tiles/pom.xml
===================================================================
--- tiles/pom.xml       (revision 411049)
+++ tiles/pom.xml       (working copy)
@@ -43,9 +43,9 @@
              <version>${pom.version}</version>
          </dependency>
          <dependency>
-            <groupId>org.apache.struts.tiles</groupId>
+            <groupId>org.apache.tiles</groupId>
              <artifactId>tiles-core</artifactId>
-            <version>0.2-SNAPSHOT</version>
+            <version>0.3-SNAPSHOT</version>
          </dependency>
      </dependencies>




((( struts/sandbox/tiles )))

Index: tiles-core/src/main/java/org/apache/tiles/ComponentContext.java
===================================================================
--- tiles-core/src/main/java/org/apache/tiles/ 
ComponentContext.java     (revision 411013)
+++ tiles-core/src/main/java/org/apache/tiles/ 
ComponentContext.java     (working copy)
@@ -25,6 +25,7 @@
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletRequest;
import javax.servlet.jsp.PageContext;
import org.apache.tiles.taglib.ComponentConstants;
@@ -186,6 +187,14 @@
          }        return (ComponentContext)  
tilesContext.getRequestScope().get(
              ComponentConstants.COMPONENT_CONTEXT);
      }
+
+    static public ComponentContext getContext(ServletRequest request) {
+       if (request.getAttribute("javax.servlet.jsp.jspException") !=  
null) {
+               return null;
+       }
+       return (ComponentContext) request.getAttribute(
+                       ComponentConstants.COMPONENT_CONTEXT);
+    }
      /**
       * Store component context into request.
@@ -198,4 +207,9 @@

          tilesContext.getRequestScope().put 
(ComponentConstants.COMPONENT_CONTEXT, context);
      }
+    static public void setContext(
+               ComponentContext context, ServletRequest request) {
+
+       request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,  
context);
+    }
}
Index: tiles-core/src/main/java/org/apache/tiles/TilesUtil.java
===================================================================
--- tiles-core/src/main/java/org/apache/tiles/TilesUtil.java     
(revision 411013)
+++ tiles-core/src/main/java/org/apache/tiles/TilesUtil.java     
(working copy)
@@ -20,6 +20,8 @@
import java.io.IOException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
import javax.servlet.jsp.PageContext;
import org.apache.commons.logging.Log;
@@ -182,7 +184,7 @@

          return tilesUtilImpl.getDefinition(definitionName,  
tilesContext);
      }
-
+
      /**
       * Reset internal state.
       * This method is used by test suites to reset the class to its  
original state.
Index: tiles-core/pom.xml
===================================================================
--- tiles-core/pom.xml  (revision 411013)
+++ tiles-core/pom.xml  (working copy)
@@ -22,7 +22,7 @@
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:// 
maven.apache.org/maven-v4_0_0.xsd">
     <parent>
-      <groupId>org.apache.struts.tiles</groupId>
+      <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-parent</artifactId>
        <version>0.3-SNAPSHOT</version>
     </parent>
Index: tiles-documentation/src/java/org/apache/struts/webapp/tiles/ 
channel/ChannelFactorySet.java
===================================================================
--- tiles-documentation/src/java/org/apache/struts/webapp/tiles/ 
channel/ChannelFactorySet.java  (revision 411013)
+++ tiles-documentation/src/java/org/apache/struts/webapp/tiles/ 
channel/ChannelFactorySet.java  (working copy)
@@ -29,12 +29,12 @@
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.struts.tiles.DefinitionsFactoryException;
-import org.apache.struts.tiles.FactoryNotFoundException;
-import org.apache.struts.tiles.xmlDefinition.DefinitionsFactory;
-import org.apache.struts.tiles.xmlDefinition.FactorySet;
-import org.apache.struts.tiles.xmlDefinition.XmlDefinitionsSet;
-import org.apache.struts.tiles.xmlDefinition.XmlParser;
+import org.apache.tiles.DefinitionsFactoryException;
+import org.apache.tiles.FactoryNotFoundException;
+import org.apache.tiles.DefinitionsFactory;
+import org.apache.tiles.xmlDefinition.FactorySet;
+import org.apache.tiles.xmlDefinition.XmlDefinitionsSet;
+import org.apache.tiles.xmlDefinition.XmlParser;
import org.xml.sax.SAXException;
/**
Index: pom.xml
===================================================================
--- pom.xml     (revision 411013)
+++ pom.xml     (working copy)
@@ -30,7 +30,7 @@
     </parent>
      <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.struts.tiles</groupId>
+    <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-parent</artifactId>
      <version>0.3-SNAPSHOT</version>
      <packaging>pom</packaging>
Index: tiles-test/pom.xml
===================================================================
--- tiles-test/pom.xml  (revision 411013)
+++ tiles-test/pom.xml  (working copy)
@@ -23,7 +23,7 @@
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:// 
maven.apache.org/maven-v4_0_0.xsd">
     <parent>
-      <groupId>org.apache.struts.tiles</groupId>
+      <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-parent</artifactId>
        <version>0.3-SNAPSHOT</version>
     </parent>




--
James Mitchell




On Jun 2, 2006, at 2:55 AM, Wendy Smoak wrote:

> On 6/1/06, Craig McClanahan <craigmcc@apache.org> wrote:
>
>> * "src/systest" in the original repository contains JUnit tests,
>>   but they (a) presume that the webapp has been deployed,
>>   and (b) use HtmlUnit to exercise the actual application and
>>   examine the returned HTML pages for correct output.  I think
>>   of these as system integration tests rather than unit tests,
>>   but vastly prefer HtmlUnit based tests like this to something
>>   built with Cactus.  Much simpler.
>>
>> We don't necessarily have to solve the systest issues tonight, but  
>> that'll
>> probably bear some thought since the same principle would apply to  
>> any
>> webapp in the repository (and, ideally, any user-defined webapp  
>> created via
>> the archetype mechanisms).
>
> Testing the webapps in that way is doable, Cargo can be used in a
> JUnit TestSetup class to start container(s) and deploy the apps, then
> the tests run as usual.
>
> For the Tiger tests, if you just need the directory structure (and not
> a deployed webapp) then it's not a problem.  There's an example of
> setting a property ('documentRoot') in core-library/pom.xml.
>
> And with that, I think I'm done for the night.  Thanks for all the  
> help!
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>


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


Mime
View raw message