You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2006/01/05 00:15:02 UTC
svn commit: r366021 [2/4] - in
/maven/maven-1/plugins/trunk/genapp/src/plugin-resources:
complex/template-resources/components/ears/ear/
complex/template-resources/components/ears/ear/src/application/
complex/template-resources/components/ears/ear/src/...
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,35 @@
+package example.web;
+
+import java.io.IOException;
+import java.util.Date;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * This is a sample servlet, typically you would not use this, but it is useful
+ * for testing the sanity of your web application configuration.
+ *
+ * @web.servlet name="HelloWorld"
+ * @web.servlet-mapping url-pattern="/HelloWorld"
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class HelloWorldServlet extends HttpServlet {
+ /**
+ * This prints out the standard "Hello world" message with a date stamp.
+ *
+ * @param request
+ * the HTTP request object
+ * @param response
+ * the HTTP response object
+ * @throws IOException
+ * thrown when there is a problem getting the writer
+ */
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response) throws IOException {
+ response.getWriter().println("Hello world on " + new Date());
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/java/example/web/HelloWorldServlet.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties Wed Jan 4 15:14:07 2006
@@ -0,0 +1,2 @@
+# Sample app properties.
+foo=bar
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/resources/app.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp Wed Jan 4 15:14:07 2006
@@ -0,0 +1,10 @@
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
+<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
+<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
+<jsp:useBean id="now" class="java.util.Date" />
+<html>
+<body>
+Hello world JSP on<fmt:formatDate value="${now}" dateStyle="full" />
+</body>
+</html>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/main/webapp/sample.jsp
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,24 @@
+package example.web;
+
+import org.apache.cactus.ServletTestCase;
+import org.apache.cactus.WebResponse;
+
+import example.web.HelloWorldServlet;
+
+/**
+ * This tests that the HelloWorld servlet is functioning
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class HelloWorldServletTest extends ServletTestCase {
+
+ public void testHelloWorld() throws Exception {
+ HelloWorldServlet servlet = new HelloWorldServlet();
+ servlet.doGet(request,response);
+ }
+
+ public void endHelloWorld(WebResponse response) {
+ assertTrue(response.getText().startsWith("Hello world on"));
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HelloWorldServletTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,52 @@
+package example.web;
+
+import org.apache.cactus.ServletTestCase;
+
+import com.meterware.httpunit.WebConversation;
+
+/**
+ * This tests the system using the HttpUnit
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class HttpUnitTest extends ServletTestCase {
+
+ /**
+ * This tests if the Hello World servlet provides the correct output
+ *
+ * @throws Exception
+ * thrown when there is a problem with the test
+ */
+ public void testHelloWorldServlet() throws Exception {
+ WebConversation wc = new WebConversation();
+ wc.getResponse(requestUrl("/HelloWorld"));
+ assertTrue(wc.getCurrentPage().getText().startsWith("Hello world on"));
+ }
+
+ /**
+ * This tests if the Hello World JSP provides the correct output
+ *
+ * @throws Exception
+ * thrown when there is a problem with the test
+ */
+ public void testHelloWorldJsp() throws Exception {
+ WebConversation wc = new WebConversation();
+ wc.getResponse(requestUrl("/sample.jsp"));
+ assertTrue(wc.getCurrentPage().getText().indexOf("Hello world JSP on") != -1);
+ }
+
+ /**
+ * This is a helper method to create the URL string for the initial web
+ * conversation request
+ *
+ * @param relativeUrl
+ * the relative URL including the leading"/"
+ * @return the context url with the relative URL appended to it
+ */
+ private String requestUrl(String relativeUrl) {
+ StringBuffer url = request.getRequestURL();
+ url.delete(url.lastIndexOf("/"), url.length());
+ url.append(relativeUrl);
+ return url.toString();
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test-cactus/java/example/web/HttpUnitTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,15 @@
+package example.web;
+
+import junit.framework.TestCase;
+
+/**
+ * This is a simple JUnit test case to ensure that the environment is okay.
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class SanityTest extends TestCase {
+ public void testSanity() {
+ assertEquals( "test", "test" );
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/complex/template-resources/components/wars/web/src/test/java/example/web/SanityTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.properties?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.properties Wed Jan 4 15:14:07 2006
@@ -15,6 +15,7 @@
# -------------------------------------------------------------------
maven.xdoc.date=left
+maven.docs.src=${basedir}/src/site/xdoc
maven.ejb.src=${maven.build.dir}/xdoclet/ejb
maven.eclipse.classpath.include=${maven.build.dir}/xdoclet/ejbdoclet,src/test-cactus
maven.xdoclet.ejbdoclet.utilobject.0.cacheHomes=true
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.xml?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/project.xml Wed Jan 4 15:14:07 2006
@@ -165,8 +165,8 @@
<build>
<defaultGoal>ejb</defaultGoal>
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
@@ -177,7 +177,7 @@
</unitTest>
<resources>
<resource>
- <directory>src/conf</directory>
+ <directory>src/main/resources</directory>
<includes>
<include>*.properties</include>
</includes>
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/ExampleFacadeLocal</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home>@PACKAGE@.ExampleFacadeLocalHome</local-home>
+ <local></local>
+ <ejb-link>ExampleFacade</ejb-link>
+ </ejb-local-ref>
+</web-app>
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,70 @@
+package @PACKAGE@;
+
+import javax.ejb.CreateException;
+import javax.ejb.EntityBean;
+
+/**
+ * This is a example of a CMP entity bean.
+ * @ejb.bean
+ * name="Example"
+ * cmp-version="2.x"
+ * primkey-field="id"
+ * @ejb.transaction
+ * type="Required"
+ * @ejb.finder
+ * signature="Example findByName(java.lang.String name)"
+ * query="SELECT DISTINCT e.id FROM Example AS e WHERE e.name = ?1"
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public abstract class ExampleBean implements EntityBean {
+ /**
+ * The primary key of the table is a number which the developer has to
+ * guarantee to be unique.
+ * @ejb.pk-field
+ * @ejb.interface-method
+ * @ejb.persistence
+ *
+ * @return an integer representing an ID on the keys table
+ */
+ public abstract Integer getId();
+
+ /**
+ * This sets the primary key value. Not an actual interface method, but
+ * needed during bean creation.
+ * @param id the new primary key value
+ */
+ public abstract void setId(final Integer id);
+
+ /**
+ * Name is a field value, you can change or add on more fields as needed.
+ * @ejb.persistence
+ * @ejb.interface-method
+ * @return the name
+ */
+ public abstract String getName();
+
+ /**
+ * Sets the name field
+ * @ejb.interface-method
+ * @param name new name
+ */
+ public abstract void setName(final String name);
+
+ /**
+ * The required EJB Creation method
+ * @ejb.create-method
+ * @param id a unique ID for the primary key
+ * @param name the value associated with the key
+ * @throws CreateException thrown when there is a problem creating
+ * @return the primary key
+ */
+ public Integer ejbCreate(final Integer id, final String name)
+ throws CreateException {
+ setName(name);
+ setId(id);
+
+ return getId();
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleBean.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,139 @@
+package @PACKAGE@;
+
+import java.math.BigInteger;
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.FinderException;
+import javax.ejb.SessionBean;
+import javax.naming.NamingException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This is a example of a stateless session bean facade to the entity bean.
+ *
+ * @ejb.bean
+ * name="ExampleFacade"
+ * @ejb.transaction
+ * type="Required"
+ *
+ * @ejb.ejb-ref
+ * ejb-name="Example"
+ * view-type="local"
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public abstract class ExampleFacadeBean implements SessionBean {
+ /**
+ * Log object
+ */
+ private Log log = LogFactory.getLog(this.getClass());
+
+ /**
+ * The required EJB Creation method
+ * @ejb.create-method
+ *
+ * @throws CreateException
+ * thrown when there is a problem creating the object
+ */
+ public void ejbCreate()
+ throws CreateException {
+ }
+
+ /**
+ * This gets the name of the specified entity.
+ *
+ * @ejb.interface-method
+ * @param id
+ * Primary key of the entity
+ * @return value of the "name" field
+ * @throws EJBException
+ * thrown if there is a problem when getting the entity
+ * value. There will be a root exception in the
+ * exception.
+ */
+ public final String getName(final Integer id)
+ throws EJBException {
+ try {
+ ExampleLocal entity =
+ ExampleUtil.getLocalHome().findByPrimaryKey(id);
+ return entity.getName();
+ } catch (FinderException e) {
+ throw new EJBException(e);
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+
+ /**
+ * This sets the name of the specified entity. Creates a new one if
+ * needed.
+ *
+ * @ejb.interface-method
+ * @param id
+ * Primary key of the entity
+ * @param name
+ * Value of the name field
+ * @throws EJBException
+ * thrown if there is a problem when getting the entity
+ * value. There will be a root exception in the
+ * exception.
+ */
+ public final void setName(final Integer id, final String name)
+ throws EJBException {
+ try {
+ try {
+ ExampleLocal entity = ExampleUtil.getLocalHome().findByPrimaryKey(id);
+ entity.setName(name);
+ } catch (FinderException e) {
+ ExampleLocal entity = ExampleUtil.getLocalHome().create(id, name);
+ }
+ } catch (CreateException e) {
+ throw new EJBException(e);
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+
+ /**
+ * This gets the primary key id based on the value of the name field.
+ * Creates a new one if needed.
+ *
+ * @ejb.interface-method
+ * @param name
+ * Value of the name field
+ * @return the primary key
+ * @throws EJBException
+ * thrown if there is a problem when getting the entity
+ * value. There will be a root exception in the
+ * exception.
+ */
+ public Integer getId(final String name)
+ throws EJBException {
+ try {
+ ExampleLocalHome home = ExampleUtil.getLocalHome();
+ ExampleLocal entity = null;
+
+ try {
+ entity = home.findByPrimaryKey((Integer) (home
+ .findByName(name)
+ .getPrimaryKey()));
+ } catch (FinderException e) {
+ log.debug("Creating a new key set named " + name);
+
+ final int hexadecimalRadix = 16;
+
+ entity = home.create(new Integer(
+ new BigInteger(ExampleFacadeUtil.generateGUID(this),
+ hexadecimalRadix).intValue()), name);
+ }
+
+ return entity.getId();
+ } catch (CreateException e) {
+ throw new EJBException(e);
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/java/ExampleFacadeBean.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties Wed Jan 4 15:14:07 2006
@@ -0,0 +1,18 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 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.
+# -------------------------------------------------------------------
+
+# Sample app properties.
+foo=bar
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/resources/app.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app >
+</web-app>
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,31 @@
+package @PACKAGE@;
+
+import org.apache.cactus.ServletTestCase;
+
+/**
+ * This tests the facade methods using the Cactus framework.
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class SanityWithCactusTest extends ServletTestCase {
+
+ public void testGetLocalHome() throws Exception {
+ ExampleFacadeUtil.getLocalHome();
+ }
+
+ public void testGetFacade() throws Exception {
+ ExampleFacadeUtil.getLocalHome().create();
+ }
+
+ public void testSetName() throws Exception {
+ ExampleFacadeLocal facade = ExampleFacadeUtil.getLocalHome().create();
+ Integer id = facade.getId("Foo");
+ assertEquals("Foo", facade.getName(id));
+ facade.setName(id, "Bar");
+ assertEquals(id,facade.getId("Bar"));
+ assertEquals("Bar", facade.getName(id));
+ facade.setName(id, "Foo");
+ assertEquals("Foo", facade.getName(id));
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test-cactus/java/SanityWithCactusTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,15 @@
+package @PACKAGE@;
+
+import junit.framework.TestCase;
+
+/**
+ * This is a simple JUnit test case to ensure that the environment is okay.
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class SanityTest extends TestCase {
+ public void testSanity() {
+ assertEquals( "test", "test" );
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template-resources/src/test/java/SanityTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template.properties?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/ejb/template.properties Wed Jan 4 15:14:07 2006
@@ -14,7 +14,7 @@
# limitations under the License.
# -------------------------------------------------------------------
-maven.genapp.repackage=java,test,test-cactus
-maven.genapp.filter=project.xml,src/conf/cactus-web.xml
+maven.genapp.repackage=main/java,test/java,test-cactus/java
+maven.genapp.filter=project.xml,src/main/config/cactus-web.xml
maven.genapp.default.package=example.ejb
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/build.properties.jboss
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/build.properties.jboss?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
Binary files - no diff available.
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.properties?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.properties Wed Jan 4 15:14:07 2006
@@ -15,23 +15,24 @@
# -------------------------------------------------------------------
maven.xdoc.date=left
-maven.eclipse.classpath.include=src/test-cactus,src/conf
+maven.docs.src=${basedir}/src/site/xdoc
+maven.eclipse.classpath.include=src/test-cactus/java,src/main/config
maven.war.webapp.dir=${maven.build.dir}/xdoclet/webdoclet
maven.xdoclet.webdoclet.0=true
maven.xdoclet.webdoclet.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.strutsconfigxml.0=true
maven.xdoclet.webdoclet.strutsconfigxml.0.validateXML=true
maven.xdoclet.webdoclet.strutsconfigxml.0.Version=1.1
maven.xdoclet.webdoclet.strutsconfigxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.strutsconfigxml.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.strutsconfigxml.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.strutsvalidationxml.0=true
maven.xdoclet.webdoclet.strutsvalidationxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
maven.xdoclet.webdoclet.jbosswebxml.0=true
maven.xdoclet.webdoclet.jbosswebxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
maven.xdoclet.webdoclet.deploymentdescriptor.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.deploymentdescriptor.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.deploymentdescriptor.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.deploymentdescriptor.0.displayname=@NAME@
maven.xdoclet.webdoclet.fileset.0.include=**/*.java
maven.xdoclet.webdoclet.jsptaglib.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF/tld
-cactus.src.mergewebxml = src/conf/cactus-web.xml
+cactus.src.mergewebxml = src/main/config/cactus-web.xml
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.xml?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/project.xml Wed Jan 4 15:14:07 2006
@@ -267,8 +267,8 @@
<build>
<defaultGoal>war</defaultGoal>
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
@@ -279,7 +279,7 @@
</unitTest>
<resources>
<resource>
- <directory>src/conf</directory>
+ <directory>src/main/resources</directory>
<includes>
<include>*.properties</include>
</includes>
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+</web-app>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,55 @@
+package @PACKAGE@;
+
+import java.io.IOException;
+import java.util.Date;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+
+
+/**
+ * This is a simple struts action that simply redirects the input back to itself. It
+ * also sets a bean value to the current date.
+ *
+ * @struts.action
+ * name="TestForm"
+ * path="/TestInput"
+ * @struts.action-forward
+ * name="success"
+ * path="/WEB-INF/jsp/input.jsp"
+ *
+ * @author <a href="mailto:trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class InputAction extends Action {
+ /**
+ * Performs the simple action
+ *
+ * @param mapping
+ * the action mappings where you find the return value of the
+ * forward
+ * @param actionForm
+ * the action form used, in this example it will be an instance
+ * of the DynaActionForm class
+ * @param request
+ * the HTTP servlet request
+ * @param response
+ * the HTTP servlet response
+ */
+ public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
+ HttpServletRequest request, HttpServletResponse response)
+ throws IOException, ServletException {
+ if (actionForm != null) {
+ DynaActionForm form = (DynaActionForm) actionForm;
+ form.set("theDate", new Date());
+ }
+ return (mapping.findForward("success"));
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/java/InputAction.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,21 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<servlet-mapping>
+ <servlet-name>action</servlet-name>
+ <url-pattern>*.do</url-pattern>
+</servlet-mapping>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlet-mappings.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,26 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+ <servlet>
+ <servlet-name>action</servlet-name>
+ <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
+ <init-param>
+ <param-name>config</param-name>
+ <param-value>/WEB-INF/struts-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/servlets.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,30 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<form-bean
+ name="TestForm"
+ type="org.apache.struts.action.DynaActionForm">
+ <form-property
+ name="givenName"
+ type="java.lang.String" />
+ <form-property
+ name="familyName"
+ type="java.lang.String" />
+ <form-property
+ name="theDate"
+ type="java.util.Date" />
+</form-bean>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-forms.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,18 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<message-resources parameter="ApplicationResources"/>
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/merge/struts-message-resources.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties Wed Jan 4 15:14:07 2006
@@ -0,0 +1,17 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 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.
+# -------------------------------------------------------------------
+
+title.page=The title @NAME@
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/resources/ApplicationResources.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp Wed Jan 4 15:14:07 2006
@@ -0,0 +1,26 @@
+<%@ page contentType="text/html; charset=utf-8" %>
+
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
+<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
+<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
+
+<%@ taglib uri="/WEB-INF/tld/struts-bean-1.1.tld" prefix="bean" %>
+<%@ taglib uri="/WEB-INF/tld/struts-html-1.1.tld" prefix="html" %>
+<%@ taglib uri="/WEB-INF/tld/struts-logic-1.1.tld" prefix="logic" %>
+
+<html:html xhtml="true">
+<head>
+ <html:base/>
+ <title><bean:message key="title.page"/></title>
+</head>
+
+<body>
+ <p>The name is <bean:write name="TestForm" property="familyName"/>, <bean:write name="TestForm" property="givenName"/> on <bean:write name="TestForm" property="theDate"/></p>
+ <html:form action="/TestInput">
+ <html:text property="givenName" size="16"/>
+ <html:text property="familyName" size="16"/>
+ <html:submit/>
+ </html:form>
+</body>
+</html:html>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/main/webapp/WEB-INF/jsp/input.jsp
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,51 @@
+package @PACKAGE@;
+
+import org.apache.cactus.ServletTestCase;
+
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebForm;
+
+/**
+ * This tests the site using HttpUnit
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano </a>
+ * @version $Id$
+ */
+public class HttpUnitTest extends ServletTestCase {
+ /**
+ * This is a helper method to create the URL string for the initial web
+ * conversation request
+ *
+ * @param relativeUrl
+ * the relative URL including the leading"/"
+ * @return the context url with the relative URL appended to it
+ */
+ private String requestUrl(String relativeUrl) {
+ StringBuffer url = request.getRequestURL();
+ url.delete(url.lastIndexOf("/"), url.length());
+ url.append(relativeUrl);
+ return url.toString();
+ }
+
+ /**
+ * This tests if the sample struts form works properly
+ *
+ * @throws Exception
+ * thrown when there is a problem with the test
+ */
+ public void testStrutsPages() throws Exception {
+ WebConversation wc = new WebConversation();
+ wc.getResponse(requestUrl("/TestInput.do"));
+ {
+ WebForm form = wc.getCurrentPage().getForms()[0];
+ form.setParameter("givenName", "Archie");
+ form.setParameter("familyName", "Trajano");
+ form.submit();
+ }
+ {
+ WebForm form = wc.getCurrentPage().getForms()[0];
+ assertEquals("Archie", form.getParameterValue("givenName"));
+ assertEquals("Trajano", form.getParameterValue("familyName"));
+ }
+ }
+};
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/HttpUnitTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,31 @@
+package @PACKAGE@;
+
+import servletunit.struts.CactusStrutsTestCase;
+
+/**
+ * This tests the functionality of the StrutsTestCase
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano </a>
+ * @version $Id$
+ */
+public class StrutsTest extends CactusStrutsTestCase {
+
+ /**
+ * Required constructor for CactusStrutsTestCase
+ *
+ * @param name
+ * name of the test
+ */
+ public StrutsTest(String name) {
+ super(name);
+ }
+
+ public void testInputForm() throws Exception {
+ setRequestPathInfo("/TestInput.do");
+ addRequestParameter("givenName", "Archie");
+ addRequestParameter("familyName", "Trajano");
+ actionPerform();
+ verifyForward("success");
+ verifyNoActionErrors();
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test-cactus/java/StrutsTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,15 @@
+package @PACKAGE@;
+
+import junit.framework.TestCase;
+
+/**
+ * This is a simple JUnit test case to ensure that the environment is okay.
+ *
+ * @author <a href="trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class SanityTest extends TestCase {
+ public void testSanity() {
+ assertEquals( "test", "test" );
+ }
+}
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template-resources/src/test/java/SanityTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template.properties?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-jstl/template.properties Wed Jan 4 15:14:07 2006
@@ -14,7 +14,7 @@
# limitations under the License.
# -------------------------------------------------------------------
-maven.genapp.repackage=java,test,test-cactus
-maven.genapp.filter=project.xml,src/conf/cactus-web.xml,src/merge/**,src/conf/ApplicationResources.properties,project.properties
+maven.genapp.repackage=main/java,test/java,test-cactus/java
+maven.genapp.filter=project.xml,src/main/config/cactus-web.xml,src/main/merge/**,src/main/resources/ApplicationResources.properties,project.properties
maven.genapp.default.package=example.web
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/build.properties.jboss
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/build.properties.jboss?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
Binary files - no diff available.
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/maven.xml?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/maven.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/maven.xml Wed Jan 4 15:14:07 2006
@@ -17,7 +17,7 @@
*/
-->
-<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" default="war">
+<project xmlns:j="jelly:core" xmlns:ant="jelly:ant">
<preGoal name="java:compile">
<mkdir dir="target\xdoclet\webdoclet\WEB-INF" />
<attainGoal name="xdoclet:webdoclet" />
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.properties?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.properties Wed Jan 4 15:14:07 2006
@@ -15,23 +15,24 @@
# -------------------------------------------------------------------
maven.xdoc.date=left
-maven.eclipse.classpath.include=src/test-cactus,src/conf
+maven.docs.src=${basedir}/src/site/xdoc
+maven.eclipse.classpath.include=src/test-cactus/java,src/main/config
maven.war.webapp.dir=${maven.build.dir}/xdoclet/webdoclet
maven.xdoclet.webdoclet.0=true
maven.xdoclet.webdoclet.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.strutsconfigxml.0=true
maven.xdoclet.webdoclet.strutsconfigxml.0.validateXML=true
maven.xdoclet.webdoclet.strutsconfigxml.0.Version=1.1
maven.xdoclet.webdoclet.strutsconfigxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.strutsconfigxml.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.strutsconfigxml.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.strutsvalidationxml.0=true
maven.xdoclet.webdoclet.strutsvalidationxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.strutsvalidationxml.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.strutsvalidationxml.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.jbosswebxml.0=true
maven.xdoclet.webdoclet.jbosswebxml.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
maven.xdoclet.webdoclet.deploymentdescriptor.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF
-maven.xdoclet.webdoclet.deploymentdescriptor.0.mergeDir=src/merge
+maven.xdoclet.webdoclet.deploymentdescriptor.0.mergeDir=src/main/merge
maven.xdoclet.webdoclet.fileset.0.include=**/*.java
maven.xdoclet.webdoclet.jsptaglib.0.destDir=${maven.build.dir}/xdoclet/webdoclet/WEB-INF/tld
-cactus.src.mergewebxml = src/conf/cactus-web.xml
+cactus.src.mergewebxml = src/main/config/cactus-web.xml
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.xml?rev=366021&r1=366020&r2=366021&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/project.xml Wed Jan 4 15:14:07 2006
@@ -265,9 +265,10 @@
</dependencies>
<build>
+ <defaultGoal>war</defaultGoal>
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
@@ -278,7 +279,7 @@
</unitTest>
<resources>
<resource>
- <directory>src/conf</directory>
+ <directory>src/main/resources</directory>
<includes>
<include>*.properties</include>
</includes>
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+</web-app>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/config/cactus-web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java Wed Jan 4 15:14:07 2006
@@ -0,0 +1,64 @@
+package @PACKAGE@;
+
+import java.io.IOException;
+import java.util.Date;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+import org.apache.struts.validator.DynaValidatorActionForm;
+import org.apache.struts.validator.DynaValidatorForm;
+
+/**
+ * This is a simple struts action that simply redirects the input back to itself. It
+ * also sets a bean value to the current date.
+ *
+ * @struts.action
+ * name="TestForm"
+ * path="/TestInput"
+ * input="/WEB-INF/jsp/input.jsp"
+ * validate="true"
+ * @struts.action
+ * name="TestForm"
+ * path="/TestInputStart"
+ * validate="false"
+ * @struts.action-forward
+ * name="success"
+ * path="/WEB-INF/jsp/input.jsp"
+ *
+ * @author <a href="mailto:trajano@yahoo.com">Archimedes Trajano</a>
+ * @version $Id$
+ */
+public class InputAction extends Action {
+
+ /**
+ * Performs the simple action
+ *
+ * @param mapping
+ * the action mappings where you find the return value of the
+ * forward
+ * @param actionForm
+ * the action form used, in this example it will be an instance
+ * of the DynaActionForm class
+ * @param request
+ * the HTTP servlet request
+ * @param response
+ * the HTTP servlet response
+ */
+ public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
+ HttpServletRequest request, HttpServletResponse response)
+ throws IOException, ServletException {
+ if (actionForm != null) {
+ System.out.println(actionForm.getClass());
+ DynaActionForm form = (DynaActionForm) actionForm;
+ form.set("theDate", new Date());
+ }
+ return (mapping.findForward("success"));
+ }
+}
\ No newline at end of file
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/java/InputAction.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,21 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<servlet-mapping>
+ <servlet-name>action</servlet-name>
+ <url-pattern>*.do</url-pattern>
+</servlet-mapping>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlet-mappings.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,26 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+ <servlet>
+ <servlet-name>action</servlet-name>
+ <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
+ <init-param>
+ <param-name>config</param-name>
+ <param-value>/WEB-INF/struts-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/servlets.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,30 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<form-bean
+ name="TestForm"
+ type="org.apache.struts.validator.DynaValidatorActionForm">
+ <form-property
+ name="givenName"
+ type="java.lang.String" />
+ <form-property
+ name="familyName"
+ type="java.lang.String" />
+ <form-property
+ name="theDate"
+ type="java.util.Date" />
+</form-bean>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-forms.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,18 @@
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<message-resources parameter="ApplicationResources"/>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-message-resources.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,3 @@
+<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
+ <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
+</plug-in>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/struts-plugins.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml Wed Jan 4 15:14:07 2006
@@ -0,0 +1,12 @@
+<formset>
+ <form name="/TestInput">
+ <field property="givenName" depends="required">
+ <msg name="required" key="error.givenname"/>
+ </field>
+ </form>
+ <form name="TestForm">
+ <field property="givenName" depends="required">
+ <msg name="required" key="error.givenname"/>
+ </field>
+ </form>
+</formset>
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/merge/validation-global.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties?rev=366021&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties Wed Jan 4 15:14:07 2006
@@ -0,0 +1,35 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 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.
+# -------------------------------------------------------------------
+
+title.page=The title @NAME@
+error.givenname=Given name must be provided
+
+errors.required={0} is required.
+errors.minlength={0} can not be less than {1} characters.
+errors.maxlength={0} can not be greater than {1} characters.
+errors.invalid={0} is invalid.
+
+errors.byte={0} must be a byte.
+errors.short={0} must be a short.
+errors.integer={0} must be an integer.
+errors.long={0} must be a long.
+errors.float={0} must be a float.
+errors.double={0} must be a double.
+
+errors.date={0} is not a date.
+errors.range={0} is not in the range {1} through {2}.
+errors.creditcard={0} is an invalid credit card number.
+errors.email={0} is an invalid e-mail address.
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-resources/struts-validation/template-resources/src/main/resources/ApplicationResources.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"