From 637306f20aae8b0ff44f7031069f99c426f76f24 Mon Sep 17 00:00:00 2001 From: felipeal Date: Sat, 29 Oct 2005 01:06:17 +0000 Subject: [PATCH] MPGENAPP-10: added Tapestry template git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@329336 13f79535-47bb-0310-9956-ffa450edef68 --- .../tapestry/template-resources/.cvsignore | 6 + .../template-resources/build.properties.jboss | 25 ++ .../build.properties.tomcat | 26 ++ .../tapestry/template-resources/maven.xml | 26 ++ .../template-resources/project.properties | 28 ++ .../tapestry/template-resources/project.xml | 289 ++++++++++++++++++ .../src/conf/ApplicationResources.properties | 17 ++ .../src/conf/cactus-web.xml | 23 ++ .../template-resources/src/java/Home.java | 25 ++ .../src/merge/filter-mappings.xml | 4 + .../template-resources/src/merge/filters.xml | 4 + .../src/merge/servlet-mappings.xml | 4 + .../template-resources/src/merge/servlets.xml | 5 + .../src/test/SanityTest.java | 30 ++ .../src/webapp/WEB-INF/Home.html | 32 ++ .../src/webapp/WEB-INF/Home.page | 28 ++ .../src/webapp/WEB-INF/helloworld.application | 26 ++ .../tapestry/template.properties | 20 ++ genapp/src/plugin-test/tapestryTest/maven.xml | 34 +++ .../tapestryTest/project.properties | 24 ++ .../src/plugin-test/tapestryTest/project.xml | 36 +++ genapp/xdocs/changes.xml | 1 + 22 files changed, 713 insertions(+) create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/.cvsignore create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/build.properties.jboss create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/build.properties.tomcat create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/maven.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/project.properties create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/project.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/conf/ApplicationResources.properties create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/conf/cactus-web.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/java/Home.java create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/merge/filter-mappings.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/merge/filters.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlet-mappings.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlets.xml create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/test/SanityTest.java create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.html create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.page create mode 100755 genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/helloworld.application create mode 100644 genapp/src/plugin-resources/tapestry/template.properties create mode 100644 genapp/src/plugin-test/tapestryTest/maven.xml create mode 100644 genapp/src/plugin-test/tapestryTest/project.properties create mode 100644 genapp/src/plugin-test/tapestryTest/project.xml diff --git a/genapp/src/plugin-resources/tapestry/template-resources/.cvsignore b/genapp/src/plugin-resources/tapestry/template-resources/.cvsignore new file mode 100755 index 00000000..d411391a --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/.cvsignore @@ -0,0 +1,6 @@ +target +.classpath +.project +*.log +build.xml +build.properties diff --git a/genapp/src/plugin-resources/tapestry/template-resources/build.properties.jboss b/genapp/src/plugin-resources/tapestry/template-resources/build.properties.jboss new file mode 100755 index 00000000..0743db8e --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/build.properties.jboss @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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. +# ------------------------------------------------------------------- + +# Specify a Cactus test container. +cactus.home.jboss3x=C:/j2ee/jboss-3.2.3_jetty-4.2.14 +# Specify the XDoclet properties for the descriptor +maven.xdoclet.ejbdoclet.jboss.0=true +maven.xdoclet.ejbdoclet.jboss.0.Version=3.2 +maven.xdoclet.ejbdoclet.jboss.0.mergeDir=src/merge +maven.xdoclet.ejbdoclet.jboss.0.preferredrelationmapping="relation-table" +maven.xdoclet.ejbdoclet.jboss.0.unauthenticatedPrincipal="nobody" +maven.xdoclet.ejbdoclet.jboss.0.destDir=${maven.build.dir}/xdoclet/ejb/META-INF diff --git a/genapp/src/plugin-resources/tapestry/template-resources/build.properties.tomcat b/genapp/src/plugin-resources/tapestry/template-resources/build.properties.tomcat new file mode 100755 index 00000000..5c76c63c --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/build.properties.tomcat @@ -0,0 +1,26 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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. +# ------------------------------------------------------------------- + +# Specify a Cactus test container. +cactus.home.tomcat5x=C:/program files/Apache Group/Tomcat 5.5 +# Specify the XDoclet properties for the descriptor +maven.xdoclet.ejbdoclet.jboss.0=true +maven.xdoclet.ejbdoclet.jboss.0.Version=3.2 +maven.xdoclet.ejbdoclet.jboss.0.mergeDir=src/merge +maven.xdoclet.ejbdoclet.jboss.0.preferredrelationmapping="relation-table" +maven.xdoclet.ejbdoclet.jboss.0.unauthenticatedPrincipal="nobody" +maven.xdoclet.ejbdoclet.jboss.0.destDir=${maven.build.dir}/xdoclet/ejb/META-INF + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/maven.xml b/genapp/src/plugin-resources/tapestry/template-resources/maven.xml new file mode 100755 index 00000000..d3054519 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/maven.xml @@ -0,0 +1,26 @@ + + + + + + + + + + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/project.properties b/genapp/src/plugin-resources/tapestry/template-resources/project.properties new file mode 100755 index 00000000..14fe961c --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/project.properties @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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. +# ------------------------------------------------------------------- + +maven.xdoc.date=left +maven.eclipse.classpath.include=src/test-cactus,src/conf +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.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.fileset.0.include=**/*.java +cactus.src.mergewebxml=src/conf/cactus-web.xml diff --git a/genapp/src/plugin-resources/tapestry/template-resources/project.xml b/genapp/src/plugin-resources/tapestry/template-resources/project.xml new file mode 100755 index 00000000..93866783 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/project.xml @@ -0,0 +1,289 @@ + + + + + + + + 3 + + + @ID@ + @ID@ + + + @NAME@ + + + 1.0 + + + + Apache Software Foundation + http://www.apache.org/ + http://maven.apache.org/images/jakarta-logo-blue.gif + + + + 2005 + @PACKAGE@ + http://maven.apache.org/images/maven.jpg + A collection of example projects showing how to use maven in different situations + + + How to use maven in different situations + + + http://maven.apache.org/reference/plugins/examples/ + http://nagoya.apache.org/scarab/servlet/scarab/ + jakarta.apache.org + /www/maven.apache.org/reference/plugins/examples/ + /www/maven.apache.org/builds/ + + + + scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/examples + http://cvs.apache.org/viewcvs/maven-plugins/examples/ + + + + + + + + + + + + + junit + 3.8.1 + + + + servletapi + 2.3 + + + + cactus + cactus + 13-1.7.1 + + + + commons-logging + commons-logging + 1.0.4 + + true + + + + + + tapestry + tapestry + 3.0 + + true + + + + + tapestry + tapestry-contrib + 3.0 + + true + + + + + commons-lang + commons-lang + 2.0 + + true + + + + + commons-collections + commons-collections + 3.1 + + true + + + + + commons-beanutils + commons-beanutils + 1.6.1 + + true + + + + + commons-digester + commons-digester + 1.5 + + true + + + + + + commons-codec + commons-codec + 1.2 + + true + + + + + commons-fileupload + commons-fileupload + 1.0 + + true + + + + + javassist + javassist + 2.5.1 + + true + + + + + bsf + bsf + 2.3.0 + + true + + + + + ognl + ognl + 2.6.5 + + true + + + + + oro + oro + 2.0.8 + + true + + + + + + xdoclet + 1.2 + + + + xdoclet + xdoclet-web-module + 1.2 + http://xdoclet.sf.net/ + + + + xdoclet + xdoclet-ejb-module + 1.2 + http://xdoclet.sf.net/ + + + + xdoclet + xjavadoc + 1.0.2 + http://xdoclet.sf.net/ + + + + xdoclet + maven-xdoclet-plugin + 1.2 + plugin + http://xdoclet.sf.net/ + + + + + httpunit + httpunit + 1.6 + + true + + + + + jtidy + jtidy + 4aug2000r7-dev + + true + + + + + + + turbine-maven-dev@jakarta.apache.org + src/java + src/test + + + **/*Test.java + + + **/NaughtyTest.java + + + + + src/conf + + *.properties + + + + + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/conf/ApplicationResources.properties b/genapp/src/plugin-resources/tapestry/template-resources/src/conf/ApplicationResources.properties new file mode 100755 index 00000000..6e09bf37 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/conf/ApplicationResources.properties @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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 @PACKAGE@ \ No newline at end of file diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/conf/cactus-web.xml b/genapp/src/plugin-resources/tapestry/template-resources/src/conf/cactus-web.xml new file mode 100755 index 00000000..128d61fa --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/conf/cactus-web.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/java/Home.java b/genapp/src/plugin-resources/tapestry/template-resources/src/java/Home.java new file mode 100755 index 00000000..2712d666 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/java/Home.java @@ -0,0 +1,25 @@ +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package @PACKAGE@; + +import java.util.Date; +import org.apache.tapestry.html.BasePage; + +public class Home extends BasePage { + public Date getCurrentDate() { + return new Date(); + } +} \ No newline at end of file diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filter-mappings.xml b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filter-mappings.xml new file mode 100755 index 00000000..e19382b2 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filter-mappings.xml @@ -0,0 +1,4 @@ + + redirect + / + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filters.xml b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filters.xml new file mode 100755 index 00000000..1950a2a1 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/filters.xml @@ -0,0 +1,4 @@ + + redirect + org.apache.tapestry.RedirectFilter + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlet-mappings.xml b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlet-mappings.xml new file mode 100755 index 00000000..b29b9344 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlet-mappings.xml @@ -0,0 +1,4 @@ + + tapestry + /app + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlets.xml b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlets.xml new file mode 100755 index 00000000..499aa32e --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/merge/servlets.xml @@ -0,0 +1,5 @@ + + tapestry + org.apache.tapestry.ApplicationServlet + 0 + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/test/SanityTest.java b/genapp/src/plugin-resources/tapestry/template-resources/src/test/SanityTest.java new file mode 100755 index 00000000..c0b5407f --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/test/SanityTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package @PACKAGE@; + +import junit.framework.TestCase; + +/** + * This is a simple JUnit test case to ensure that the environment is okay. + * + * @author Archimedes Trajano + * @version $Id: SanityTest.java,v 1.1 2004/02/27 06:22:26 evenisse Exp $ + */ +public class SanityTest extends TestCase { + public void testSanity() { + assertEquals( "test", "test" ); + } +} diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.html b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.html new file mode 100755 index 00000000..87b45489 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.html @@ -0,0 +1,32 @@ + + + + + Hello World + + + + Welcome to your first Tapestry Application. + +

The current date and time is: This Text Will Be Replaced

+ +

Click here to refresh.

+ + + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.page b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.page new file mode 100755 index 00000000..b4560b6b --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/Home.page @@ -0,0 +1,28 @@ + + + + + Hello World Home Page + + + + + Home + + diff --git a/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/helloworld.application b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/helloworld.application new file mode 100755 index 00000000..88fad9c0 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template-resources/src/webapp/WEB-INF/helloworld.application @@ -0,0 +1,26 @@ + + + + + + + @NAME@ + diff --git a/genapp/src/plugin-resources/tapestry/template.properties b/genapp/src/plugin-resources/tapestry/template.properties new file mode 100644 index 00000000..9dbdd598 --- /dev/null +++ b/genapp/src/plugin-resources/tapestry/template.properties @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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. +# ------------------------------------------------------------------- + +maven.genapp.repackage=java,test,test-cactus +maven.genapp.filter=project.xml,src/conf/cactus-web.xml,src/merge/**,src/webapp/WEB-INF/**/*.page,src/webapp/WEB-INF/**/*.application + +maven.genapp.default.package=example.web diff --git a/genapp/src/plugin-test/tapestryTest/maven.xml b/genapp/src/plugin-test/tapestryTest/maven.xml new file mode 100644 index 00000000..1622ee95 --- /dev/null +++ b/genapp/src/plugin-test/tapestryTest/maven.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + diff --git a/genapp/src/plugin-test/tapestryTest/project.properties b/genapp/src/plugin-test/tapestryTest/project.properties new file mode 100644 index 00000000..5d7dce86 --- /dev/null +++ b/genapp/src/plugin-test/tapestryTest/project.properties @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------- +# Copyright 2005 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. +# ------------------------------------------------------------------- + +# directory where it should be generated +maven.genapp.basedir=${maven.build.dir}/my_genapp +# properties necessary to skip the prompt +template=tapestry +maven.genapp.template.id=myId +maven.genapp.template.name="Genapp testcase" +maven.genapp.template.package=org.apache.genapp + diff --git a/genapp/src/plugin-test/tapestryTest/project.xml b/genapp/src/plugin-test/tapestryTest/project.xml new file mode 100644 index 00000000..590bfaab --- /dev/null +++ b/genapp/src/plugin-test/tapestryTest/project.xml @@ -0,0 +1,36 @@ + + + + 3 + Genapp Plugin - Tapestry Test + test-maven-genapp-plugin-tapestryTest + 2005 + Tests Tapestry template + Tests Tapestry template + + + + Felipe Leme + felipeal + maven@felipeal.net + Falcon Informatica + + + diff --git a/genapp/xdocs/changes.xml b/genapp/xdocs/changes.xml index 561b1577..27451689 100644 --- a/genapp/xdocs/changes.xml +++ b/genapp/xdocs/changes.xml @@ -22,6 +22,7 @@ + Added Tapestry template. Using ${maven.home.local} instead of ${user.home}/.maven for templates. Added property maven.genapp.repackage.dir as base directory for maven.genapp.repackage. Added new property maven.genapp.basedir property.