New template for Velocity-based applications (issue MPGENAPP-19) - Thanks Miguel Griffa for the patch
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
40b4ade85a
commit
4ed21b4632
17 files changed
+725
-1
No files matched your search
+14
-1
@@ -23,7 +23,7 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-genapp-plugin</id>
|
||||
<name>Maven Genapp Plugin</name>
|
||||
<currentVersion>2.2</currentVersion>
|
||||
<currentVersion>2.3-SNAPSHOT</currentVersion>
|
||||
<shortDescription>A collection of example projects showing how to use maven in different situations</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/genapp/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/genapp/</siteDirectory>
|
||||
@@ -65,6 +65,16 @@
|
||||
<role>Java Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Felipe Leme</name>
|
||||
<id>felipeal</id>
|
||||
<email>maven@felipeal.net</email>
|
||||
<organization>Falcon Informatica</organization>
|
||||
<roles>
|
||||
<role>Java Developer</role>
|
||||
</roles>
|
||||
<timezone>-3</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
<contributors>
|
||||
<contributor>
|
||||
@@ -82,6 +92,9 @@
|
||||
<id>trajano</id>
|
||||
<email>trajano@yahoo.com</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Miguel Griffa</name>
|
||||
</contributor>
|
||||
</contributors>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
target
|
||||
.classpath
|
||||
.project
|
||||
*.log
|
||||
build.xml
|
||||
build.properties
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" default="war">
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# -------------------------------------------------------------------
|
||||
# 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.
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
maven.xdoc.date=left
|
||||
maven.eclipse.classpath.include=src/test-cactus
|
||||
maven.war.webapp.dir=${maven.src.dir}/webapp/WEB-INF
|
||||
cactus.src.mergewebxml = src/conf/cactus-web.xml
|
||||
@@ -0,0 +1,208 @@
|
||||
<?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.
|
||||
*/
|
||||
-->
|
||||
|
||||
|
||||
<project>
|
||||
<!-- the version of maven's project object model -->
|
||||
|
||||
<pomVersion>3</pomVersion>
|
||||
<!-- a unique name for this project -->
|
||||
|
||||
<id>@ID@</id>
|
||||
<groupId>@ID@</groupId>
|
||||
<!-- a short but descriptive name for the project -->
|
||||
|
||||
<name>@NAME@</name>
|
||||
|
||||
<!-- The version of the project under development, e.g.
|
||||
1.1, 1.2, 2.0-SNAPSHOT -->
|
||||
<currentVersion>1.0</currentVersion>
|
||||
|
||||
<!-- details about the organization that 'owns' the project -->
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
|
||||
</organization>
|
||||
<!-- the year the project started -->
|
||||
|
||||
<inceptionYear>2004</inceptionYear>
|
||||
<package>@PACKAGE@</package>
|
||||
<logo>http://maven.apache.org/images/maven.jpg</logo>
|
||||
<description>A collection of example projects showing how to use maven in different situations</description>
|
||||
<!-- a short description of what the project does -->
|
||||
|
||||
<shortDescription>How to use maven in different situations</shortDescription>
|
||||
<!-- the project home page -->
|
||||
|
||||
<url>http://maven.apache.org/reference/plugins/examples/</url>
|
||||
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
|
||||
<siteAddress>jakarta.apache.org</siteAddress>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/examples/</siteDirectory>
|
||||
<distributionDirectory>/www/maven.apache.org/builds/</distributionDirectory>
|
||||
<!-- the version control repository and http url for online access
|
||||
the connection element has the form:
|
||||
scm:<system>:<system specific connection string> -->
|
||||
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/examples</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/examples/</url>
|
||||
</repository>
|
||||
<!-- any mailing lists for the project -->
|
||||
|
||||
<mailingLists/>
|
||||
<!-- who the developers are for the project -->
|
||||
|
||||
<developers>
|
||||
</developers>
|
||||
<!-- jar files the project is dependent on -->
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<id>junit</id>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<id>servletapi</id>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cactus</groupId>
|
||||
<artifactId>cactus</artifactId>
|
||||
<version>13-1.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.1</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
<version>1.6</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>1.4</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity-dep</artifactId>
|
||||
<version>1.4</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>velocity-tools</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<version>1.1</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.5</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- HttpUnit dependencies -->
|
||||
<dependency>
|
||||
<groupId>httpunit</groupId>
|
||||
<artifactId>httpunit</artifactId>
|
||||
<version>1.5.4</version>
|
||||
<properties>
|
||||
<cactus.bundle>true</cactus.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jtidy</groupId>
|
||||
<artifactId>jtidy</artifactId>
|
||||
<version>4aug2000r7-dev</version>
|
||||
<properties>
|
||||
<cactus.bundle>true</cactus.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
|
||||
<sourceDirectory>src/java</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/NaughtyTest.java</exclude>
|
||||
</excludes>
|
||||
</unitTest>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/conf</directory>
|
||||
<includes>
|
||||
<include>*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
# -------------------------------------------------------------------
|
||||
# Copyright 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
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 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>
|
||||
@@ -0,0 +1,37 @@
|
||||
/* ====================================================================
|
||||
* Copyright 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.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Example java class to put in velocity context for presentation.
|
||||
*
|
||||
*/
|
||||
public class HelloWorld {
|
||||
|
||||
public HelloWorld() {
|
||||
}
|
||||
|
||||
public String hello() {
|
||||
return "Hello world!";
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package @PACKAGE@;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 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.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import org.apache.cactus.ServletTestCase;
|
||||
import org.apache.cactus.WebResponse;
|
||||
|
||||
import @PACKAGE@.HelloWorldServlet;
|
||||
|
||||
/**
|
||||
* This tests that the HelloWorld servlet is functioning
|
||||
*/
|
||||
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"));
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package @PACKAGE@;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 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.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import org.apache.cactus.ServletTestCase;
|
||||
|
||||
import com.meterware.httpunit.WebConversation;
|
||||
|
||||
/**
|
||||
* This tests the system using the HttpUnit
|
||||
*/
|
||||
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().startsWith("Hello world JSP on"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package @PACKAGE@;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 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.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
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: SanityTest.java,v 1.1 2004/11/25 00:26:28 felipeal Exp $
|
||||
*/
|
||||
public class SanityTest extends TestCase {
|
||||
public void testSanity() {
|
||||
assertEquals( "test", "test" );
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<toolbox>
|
||||
<tool>
|
||||
<key>helper</key>
|
||||
<class>HelloWorld</class>
|
||||
</tool>
|
||||
</toolbox>
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
# -------------------------------------------------------------------
|
||||
# Copyright 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.
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# These are the default properties for the
|
||||
# Velocity Runtime. These values are used when
|
||||
# Runtime.init() is called, and when Runtime.init(properties)
|
||||
# fails to find the specificed properties file.
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# R U N T I M E L O G
|
||||
#----------------------------------------------------------------------------
|
||||
# Velocity uses the Servlet APIs logging facilites.
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# This controls if Runtime.error(), info() and warn() messages include the
|
||||
# whole stack trace. The last property controls whether invalid references
|
||||
# are logged.
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
runtime.log.error.stacktrace = true
|
||||
runtime.log.warn.stacktrace = true
|
||||
runtime.log.info.stacktrace = true
|
||||
runtime.log.invalid.reference = true
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# T E M P L A T E E N C O D I N G
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
input.encoding=ISO-8859-1
|
||||
output.encoding=ISO-8859-1
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# F O R E A C H P R O P E R T I E S
|
||||
#----------------------------------------------------------------------------
|
||||
# These properties control how the counter is accessed in the #foreach
|
||||
# directive. By default the reference $velocityCount will be available
|
||||
# in the body of the #foreach directive. The default starting value
|
||||
# for this reference is 1.
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
directive.foreach.counter.name = velocityCount
|
||||
directive.foreach.counter.initial.value = 1
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# I N C L U D E P R O P E R T I E S
|
||||
#----------------------------------------------------------------------------
|
||||
# These are the properties that governed the way #include'd content
|
||||
# is governed.
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
directive.include.output.errormsg.start = <!-- include error :
|
||||
directive.include.output.errormsg.end = see error log -->
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# P A R S E P R O P E R T I E S
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
directive.parse.max.depth = 10
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# VELOCIMACRO PROPERTIES
|
||||
#----------------------------------------------------------------------------
|
||||
# global : name of default global library. It is expected to be in the regular
|
||||
# template path. You may remove it (either the file or this property) if
|
||||
# you wish with no harm.
|
||||
#----------------------------------------------------------------------------
|
||||
#velocimacro.library = /WEB-INF/VM_global_library.vm
|
||||
|
||||
velocimacro.permissions.allow.inline = true
|
||||
velocimacro.permissions.allow.inline.to.replace.global = false
|
||||
velocimacro.permissions.allow.inline.local.scope = false
|
||||
|
||||
velocimacro.context.localscope = false
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# INTERPOLATION
|
||||
#----------------------------------------------------------------------------
|
||||
# turn off and on interpolation of references and directives in string
|
||||
# literals. ON by default :)
|
||||
#----------------------------------------------------------------------------
|
||||
runtime.interpolate.string.literals = true
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# RESOURCE MANAGEMENT
|
||||
#----------------------------------------------------------------------------
|
||||
# Allows alternative ResourceManager and ResourceCache implementations
|
||||
# to be plugged in.
|
||||
#----------------------------------------------------------------------------
|
||||
resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl
|
||||
resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImpl
|
||||
|
||||
|
||||
|
||||
# Filepath for error template, relative to web application root directory
|
||||
tools.view.servlet.error.template = Error.vm
|
||||
|
||||
# Directory for layout templates, relative to web application root directory
|
||||
tools.view.servlet.layout.directory = layout/
|
||||
|
||||
# Filepath of the default layout template
|
||||
# relative to the layout directory
|
||||
# NOT relative to the root directory of the webapp!
|
||||
tools.view.servlet.layout.default.template = TableBased.vm
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
-->
|
||||
<web-app>
|
||||
<display-name>Velocity web application</display-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>velocity</servlet-name>
|
||||
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>org.apache.velocity.toolbox</param-name>
|
||||
<param-value>/WEB-INF/toolbox.xml</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>org.apache.velocity.properties</param-name>
|
||||
<param-value>/WEB-INF/velocity.properties</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>10</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>velocity</servlet-name>
|
||||
<url-pattern>*.vm</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
||||
@@ -0,0 +1,24 @@
|
||||
## -------------------------------------------------------------------
|
||||
## Copyright 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.
|
||||
## -------------------------------------------------------------------
|
||||
|
||||
Request class: $request.class.name <br/>
|
||||
Request content length: $request.contentLength <br/>
|
||||
Request protocol: $request.protocol <br/>
|
||||
Request locale: $request.locale<br/>
|
||||
Request real path: $request.getRealPath("/")<br/>
|
||||
Request server name: $request.serverName<br/>
|
||||
Request remote addr: $request.remoteAddr<br/>
|
||||
Request remote port (Servlets 2.4 only): $request.remotePort<br/>
|
||||
@@ -0,0 +1,20 @@
|
||||
# -------------------------------------------------------------------
|
||||
# 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.
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
maven.genapp.repackage=java,test,test-cactus
|
||||
maven.genapp.filter=project.xml,src/conf/cactus-web.xml
|
||||
|
||||
maven.genapp.default.package=example.web
|
||||
@@ -24,6 +24,9 @@
|
||||
<author email="dion@apache.org">dIon Gillard</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="2.3" date="in cvs">
|
||||
<action dev="felipeal" type="add" issue="MPGENAPP-19" due-to="Miguel Griffa">Added Velocity-based webapp template (named <code>web-velocity</code>).</action>
|
||||
</release>
|
||||
<release version="2.2" date="2004-05-15">
|
||||
<action dev="evenisse" type="fix" issue="MPGENAPP-7">Remove Struts deprecated apis.</action>
|
||||
<action dev="evenisse" type="fix">Fix StrutsTestCase dependency in struts templates.</action>
|
||||
|
||||
Reference in new issue
Block a user