You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2018/08/15 15:09:19 UTC

[turbine-archetypes] branch master updated: Updating to turbine 5.0-SNAPSHOT, requiring Java 8, Servlet 3.0

This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git


The following commit(s) were added to refs/heads/master by this push:
     new f97b59c  Updating to turbine 5.0-SNAPSHOT, requiring Java 8, Servlet 3.0
f97b59c is described below

commit f97b59cbb591affb4cc0c30764700190451c0701
Author: Georg Kallidis <ge...@cedis.fu-berlin.de>
AuthorDate: Wed Aug 15 17:09:05 2018 +0200

    Updating to turbine 5.0-SNAPSHOT, requiring Java 8, Servlet 3.0
---
 .gitignore                                             |  3 +++
 pom.xml                                                |  6 +++---
 src/main/resources/archetype-resources/pom.xml         | 10 +++++-----
 .../WEB-INF/conf/TurbineConfigurationBuilder.xml       |  4 ++--
 .../webapp/WEB-INF/conf/TurbineResources.properties    |  7 ++++++-
 .../src/main/webapp/WEB-INF/web.xml                    | 18 ++++++++++++++----
 6 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ac180e4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/target
+.settings
+.externalToolBuilders/
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ed5ba5e..8990b7f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,11 +26,11 @@
     <version>18</version>
   </parent>
   <groupId>org.apache.turbine</groupId>
-  <artifactId>turbine-webapp-4.0</artifactId>
-  <version>1.0.2-SNAPSHOT</version>
+  <artifactId>turbine-webapp-5.0</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
   <packaging>maven-archetype</packaging>
 
-  <name>Archetype - Turbine 4.0 WebApp</name>
+  <name>Archetype - Turbine 5.0 WebApp</name>
   <description>This archetype sets up a web application project based on Apache Turbine 4.0</description>
   <url>http://turbine.apache.org</url>
 
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index a1b25f6..cbee837 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -267,8 +267,8 @@ under the License.
       </dependency>
       <dependency>
           <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-          <version>2.5</version>
+          <artifactId>javax.servlet-api</artifactId>
+          <version>3.0.1</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
@@ -370,13 +370,13 @@ under the License.
     </dependencies>
 
     <properties>
-        <maven.compile.source>1.6</maven.compile.source>
-        <maven.compile.target>1.6</maven.compile.target>
+        <maven.compile.source>1.8</maven.compile.source>
+        <maven.compile.target>1.8</maven.compile.target>
         <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
         <fulcrum.json>1.1.1</fulcrum.json>
         <fulcrum.intake>1.2.3</fulcrum.intake>
         <fulcrum.security>1.1.2</fulcrum.security>
-        <turbine.core>4.0.1</turbine.core>
+        <turbine.core>5.0-SNAPSHOT</turbine.core>
         <slf4j.version>1.7.25</slf4j.version>
         <skipTests>true</skipTests>
     </properties>
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineConfigurationBuilder.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineConfigurationBuilder.xml
index 4c6407e..3299313 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineConfigurationBuilder.xml
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineConfigurationBuilder.xml
@@ -5,9 +5,9 @@
     <!-- Meta data about the resulting combined configuration -->
   </header>
   <override><!-- only allowed configurations are user and turbine, realtive paths   -->
-    <properties config-name="user" fileName="WEB-INF/conf/usersettings.properties" config-optional="true" config-forceCreate="true"/> 
+    <properties config-name="user" fileName="usersettings.properties" config-optional="true" config-forceCreate="true"/> 
     <!-- xml fileName="conf/test/TurbineResources.xml"/-->
-    <properties config-name="turbine" fileName="WEB-INF/conf/TurbineResources.properties" throwExceptionOnMissing="true"/>
+    <properties config-name="turbine" fileName="TurbineResources.properties" throwExceptionOnMissing="true"/>
    </override>
   <additional>
     <!-- Configuration declarations that form a union configuration, always provide a unique config-name attribute  -->
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
index 4e954dc..221dc0d 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
@@ -38,7 +38,7 @@ pipeline.default.descriptor = WEB-INF/conf/turbine-classic-pipeline.xml
 #
 # -------------------------------------------------------------------
 
-log4j.file = WEB-INF/conf/log4j.properties
+log4j.file = log4j.properties
 
 # -------------------------------------------------------------------
 #
@@ -588,6 +588,11 @@ services.VelocityService.resource.loader = classpath
 services.VelocityService.classpath.resource.loader.description = Velocity Classpath Resource Loader
 services.VelocityService.classpath.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 
+# Upgrading from Velocity 1.7.x to Velocity 2.0.x
+services.VelocityService.runtime.conversion.handler = none
+services.VelocityService.space.gobbling = bc
+services.VelocityService.directive.if.emptycheck = false
+
 # -------------------------------------------------------------------
 #
 #  S C H E D U L E R  S E R V I C E
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index ac18069..8fa11b6 100644
--- a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -17,10 +17,13 @@
  specific language governing permissions and limitations
  under the License.
 -->
-<web-app id="WebApp_ID" version="2.5" 
-    xmlns="http://java.sun.com/xml/ns/j2ee" 
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+<web-app 
+    xmlns="http://java.sun.com/xml/ns/javaee" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
+    version="3.0" metadata-complete="true">
+    
+    <display-name>WebApp_ID</display-name>
 <!-- ======================================================================== -->
 <!--                                                                          -->
 <!-- Web Application descriptor                                               -->
@@ -61,6 +64,13 @@
     <servlet-name>Turbine</servlet-name>
     <url-pattern>/app/*</url-pattern>
   </servlet-mapping>
+  
+  <session-config>
+       <session-timeout>60</session-timeout><!-- in minutes -->
+       <cookie-config> 
+          <max-age>3600</max-age> <!-- in seconds -->
+       </cookie-config> 
+  </session-config>
 
 <!-- ======================================================================== -->
 <!--                                                                          -->