You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2011/09/16 20:26:02 UTC

svn commit: r1171705 - in /portals/jetspeed-2/portal/trunk: ./ jetspeed-archetype/src/main/resources/archetype-resources/ jetspeed-installer/ jetspeed-installer/etc/ant-installer/ jetspeed-installer/etc/tomcat/bin/ jetspeed-installer/etc/tomcat/conf/ m...

Author: ate
Date: Fri Sep 16 18:26:01 2011
New Revision: 1171705

URL: http://svn.apache.org/viewvc?rev=1171705&view=rev
Log:
JS2-1255: Update Jetspeed demo and installer to use latest Tomcat 7.x version for hardened security
- drop support for Tomcat 5.x
- make Tomcat 7 the default
- optimize and simplify the installer tomcat configuration, using setenv.sh instead of overriding catalina.sh

Added:
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh   (with props)
Removed:
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/catalina.bat
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/catalina.sh
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/server.xml
Modified:
    portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/jetspeed-mvn-settings.xml
    portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/pom.xml
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml
    portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/context.xml
    portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml
    portals/jetspeed-2/portal/trunk/jetspeed-installer/zip-tomcat-portal-descriptor.xml
    portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml
    portals/jetspeed-2/portal/trunk/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java

Modified: portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/jetspeed-mvn-settings.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/jetspeed-mvn-settings.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/jetspeed-mvn-settings.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/jetspeed-mvn-settings.xml Fri Sep 16 18:26:01 2011
@@ -55,8 +55,8 @@
       </activation>
       <properties>
         
-        <org.apache.jetspeed.server.home>/change/this/apache-tomcat-6.0.18/</org.apache.jetspeed.server.home>
-        <org.apache.jetspeed.catalina.version.major>6</org.apache.jetspeed.catalina.version.major>
+        <org.apache.jetspeed.server.home>/change/this/apache-tomcat-7.0.21/</org.apache.jetspeed.server.home>
+        <org.apache.jetspeed.catalina.version.major>7</org.apache.jetspeed.catalina.version.major>
         
         <!--
           <org.apache.jetspeed.production.database.default.name>mysql</org.apache.jetspeed.production.database.default.name>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/pom.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-archetype/src/main/resources/archetype-resources/pom.xml Fri Sep 16 18:26:01 2011
@@ -43,14 +43,6 @@
     <org.apache.jetspeed.server.home>/opt/apache-tomcat-5.5.27/</org.apache.jetspeed.server.home>
   </properties>
 
-  <repositories>
-    <repository>
-      <id>bluesunrise</id>
-      <name>BlueSunrise Maven 2 Repository</name>
-      <url>http://bluesunrise.com/maven2</url>
-    </repository>
-  </repositories>
-
   <dependencyManagement>
     <dependencies>
       <dependency>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml Fri Sep 16 18:26:01 2011
@@ -100,7 +100,7 @@
     ifProperty="(${operation}=install) AND (${installationType}=demo)">
     <hidden property="setupDBAntTarget" value="runSetupNoDB" />
     <comment displayText="Jetspeed Enterprise Portal version 2.2.2-SNAPSHOT, (Demo)" bold="true" />
-    <target displayText="Tomcat 6.0.18 Webserver" target="install" defaultValue="true" force="true" />
+    <target displayText="Tomcat 7.0.21 Webserver" target="install" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Portal" property="dummy" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Layout Portlets" property="dummy" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Administration Portlets" property="dummy" defaultValue="true" force="true" />
@@ -115,7 +115,7 @@
     ifProperty="(${operation}=install) AND (${installationType}=minimal)">
     <hidden property="setupDBAntTarget" value="runSetupNoDB" />
     <comment displayText="Jetspeed Enterprise Portal version 2.2.2-SNAPSHOT" bold="true" />
-    <target displayText="Tomcat 6.0.18 Webserver" target="install" defaultValue="true" force="true" />
+    <target displayText="Tomcat 7.0.21 Webserver" target="install" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Portal" property="dummy" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Layout Portlets" property="dummy" defaultValue="true" force="true" />
     <checkbox displayText="Jetspeed Administration Portlets" property="dummy" defaultValue="true" force="true" />

Added: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat?rev=1171705&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat Fri Sep 16 18:26:01 2011
@@ -0,0 +1,16 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+set JAVA_OPTS=%JAVA_OPTS% -Xmx512m -XX:MaxPermSize=128m

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.bat
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh?rev=1171705&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh Fri Sep 16 18:26:01 2011
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+export JAVA_OPTS="$JAVA_OPTS -Xmx512m -XX:MaxPermSize=128m"

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/bin/setenv.sh
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/context.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/context.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/context.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/tomcat/conf/context.xml Fri Sep 16 18:26:01 2011
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!-- The contents of this file will be loaded for each web application -->
-<Context>
+<Context sessionCookiePath="/">
 
     <!-- Default set of monitored resources -->
     <WatchedResource>WEB-INF/web.xml</WatchedResource>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml Fri Sep 16 18:26:01 2011
@@ -38,8 +38,8 @@
   <packaging>pom</packaging>
 
   <properties>
-    <tomcat.version.major>6</tomcat.version.major>
-    <tomcat.version.minor>6.0.18</tomcat.version.minor>
+    <tomcat.version.major>7</tomcat.version.major>
+    <tomcat.version.minor>7.0.21</tomcat.version.minor>
     <tomcat.name>apache-tomcat-${tomcat.version.minor}</tomcat.name>
     <org.apache.portals.jetspeed.version>${project.version}</org.apache.portals.jetspeed.version>
     <org.apache.jetspeed.portal.context.name>jetspeed</org.apache.jetspeed.portal.context.name>
@@ -77,10 +77,7 @@
                       overwrite="false"/>
 
                     <delete file="${org.apache.jetspeed.portal.home}/NOTICE"/>
-                    <delete file="${org.apache.jetspeed.portal.home}/bin/catalina.bat"/>
-                    <delete file="${org.apache.jetspeed.portal.home}/bin/catalina.sh"/>
                     <delete file="${org.apache.jetspeed.portal.home}/conf/context.xml"/>
-                    <delete file="${org.apache.jetspeed.portal.home}/conf/server.xml"/>
                     <delete file="${org.apache.jetspeed.portal.home}/conf/tomcat-users.xml"/>
                     <delete dir="${org.apache.jetspeed.portal.home}/webapps/examples"/>
                     <delete dir="${org.apache.jetspeed.portal.home}/webapps/docs"/>
@@ -191,11 +188,6 @@
                       <file>${project.build.directory}/resources/tomcat/context.xml</file>
                       <destination>context</destination>
                     </deployment>
-                    <!-- Tomcat server conf override -->
-                    <deployment>
-                      <file>${project.build.directory}/../etc/tomcat/conf/server.xml</file>
-                      <destination>server-conf</destination>
-                    </deployment>                    
                     <!-- admin portlet application -->
                     <deployment>
                       <artifact>org.apache.portals.jetspeed-2:j2-admin:war</artifact>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/zip-tomcat-portal-descriptor.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/zip-tomcat-portal-descriptor.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/zip-tomcat-portal-descriptor.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/zip-tomcat-portal-descriptor.xml Fri Sep 16 18:26:01 2011
@@ -32,10 +32,6 @@
     </fileSet>
     <fileSet>
       <directory>etc/tomcat</directory>
-      <excludes>
-        <!-- already copied *and* rewritten during deploy processing -->
-        <exclude>conf/server.xml</exclude>
-      </excludes>
       <outputDirectory>/</outputDirectory>
     </fileSet>
   </fileSets>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml Fri Sep 16 18:26:01 2011
@@ -54,7 +54,7 @@
       <properties>
 
         <org.apache.jetspeed.server.home>@rootdir@/applications/jetspeed-demo/target/demo-deploy</org.apache.jetspeed.server.home>
-        <org.apache.jetspeed.catalina.version.major>6</org.apache.jetspeed.catalina.version.major>
+        <org.apache.jetspeed.catalina.version.major>7</org.apache.jetspeed.catalina.version.major>
 
         <!-- demo embedded Derby database configurations -->
         

Modified: portals/jetspeed-2/portal/trunk/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java?rev=1171705&r1=1171704&r2=1171705&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java (original)
+++ portals/jetspeed-2/portal/trunk/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java Fri Sep 16 18:26:01 2011
@@ -58,7 +58,7 @@ public class DeployMojo extends Abstract
     private static final String DEPLOY_FACTORY_CLASS_NAME = "org.apache.jetspeed.tools.deploy.JetspeedDeployFactory";
 
     /**
-     * Support only Tomcat 5.5.27+ or Tomcat 6.0.18+. The profile attribute is
+     * Support only Tomcat 6.0.33+. The profile attribute is
      * typically set in the plugin configurations using the following tags:
      *
      * <profile>tomcat${org.apache.jetspeed.catalina.version.major}</profile>
@@ -66,21 +66,18 @@ public class DeployMojo extends Abstract
      * <profile>tomcat${tomcat.version.major}</profile>
      *
      * The supported values for the org.apache.jetspeed.catalina.version.major
-     * property are '5', '5.5', and '6'. If unset, the profile value will be
+     * property are '6' and '7'. If unset, the profile value will be
      * 'tomcat' or 'tomcatnull', which will imply the default tomcat support.
      *
-     * The supported values for the tomcat.version.major are '5' and '6'.
-     *
-     * Tomcat 6, ('tomcat6'), support is the default; Tomcat 5, ('tomcat5'), and
-     * Tomcat 5.5, ('tomcat5.5'), both map to Tomcat 5.5 which is the minimum
-     * Tomcat 5.X version currently supported.
+     * The supported values for the tomcat.version.major are '6' and '7'.
+     * 
+     * The current implementation makes no distinction between either version (anymore).
      */
     private static final String PROFILE_TOMCAT = "tomcat";
     private static final String PROFILE_TOMCAT_NULL = "tomcatnull";
-    private static final String PROFILE_TOMCAT5 = "tomcat5";
-    private static final String PROFILE_TOMCAT55 = "tomcat5.5";
     private static final String PROFILE_TOMCAT6 = "tomcat6";
-    private static final String DEFAULT_PROFILE = PROFILE_TOMCAT6; 
+    private static final String PROFILE_TOMCAT7 = "tomcat7";
+    private static final String DEFAULT_PROFILE = PROFILE_TOMCAT7; 
 
     public static class Deployment
     {
@@ -784,77 +781,38 @@ public class DeployMojo extends Abstract
         {
             profile = DEFAULT_PROFILE;
         }
-        else if (profile.equals(PROFILE_TOMCAT55))
+    	else if (!(profile.equals(PROFILE_TOMCAT6) || profile.equals(PROFILE_TOMCAT7)))
         {
-            profile = PROFILE_TOMCAT5;
-        }
-    	else if (!(profile.equals(PROFILE_TOMCAT5) || profile.equals(PROFILE_TOMCAT6)))
-        {
-    		throw new MojoFailureException("Cannot handle profile '" + profile + "', use '" + PROFILE_TOMCAT5 + "' or '" + PROFILE_TOMCAT6 + "'");
+    		throw new MojoFailureException("Cannot handle profile '" + profile + "', use '" + PROFILE_TOMCAT6 + "' or '" + PROFILE_TOMCAT7 + "'");
     	}
 
-    	// configure destinations
-    	if (profile.equals(PROFILE_TOMCAT5))
+        if (!destMap.containsKey("system"))
         {
-	        if (!destMap.containsKey("system"))
-	        {
-	            destMap.put("system","common/endorsed");
-	        }
-	        if (!destMap.containsKey("lib"))
-	        {
-	            destMap.put("lib","shared/lib");
-	        }
-	        if (!destMap.containsKey("war"))
-	        {
-	            destMap.put("war", "webapps");
-	        }
-	        if (!destMap.containsKey("deploy"))
-	        {
-	            destMap.put("deploy", ((String)destMap.get("war"))+"/"+portalName+"/WEB-INF/deploy");
-	        }
-	        if (!destMap.containsKey("local"))
-	        {
-	            destMap.put("local", ((String)destMap.get("deploy"))+"/local");
-	        }
-            if (!destMap.containsKey("server-conf"))
-            {
-                destMap.put("server-conf", "conf");
-            }
-            if (!destMap.containsKey("server-lib"))
-            {
-                destMap.put("server-lib","server/lib");
-            }
-    	}
-    	else if (profile.equals(PROFILE_TOMCAT6))
+            destMap.put("system","lib");
+        }
+        if (!destMap.containsKey("lib"))
         {
-    		if (!destMap.containsKey("system"))
-            {
-                destMap.put("system","lib");
-            }
-            if (!destMap.containsKey("lib"))
-            {
-                destMap.put("lib","lib");
-            }
-            if (!destMap.containsKey("war"))
-            {
-                destMap.put("war", "webapps");
-            }
-            if (!destMap.containsKey("deploy"))
-            {
-                destMap.put("deploy", ((String)destMap.get("war"))+"/"+portalName+"/WEB-INF/deploy");
-            }
-            if (!destMap.containsKey("local"))
-            {
-                destMap.put("local", ((String)destMap.get("deploy"))+"/local");
-            }
-            if (!destMap.containsKey("server-conf"))
-            {
-                destMap.put("server-conf", "conf");
-            }
-            if (!destMap.containsKey("server-lib"))
-            {
-                destMap.put("server-lib", "lib");
-            }
-    	}
+            destMap.put("lib","lib");
+        }
+        if (!destMap.containsKey("war"))
+        {
+            destMap.put("war", "webapps");
+        }
+        if (!destMap.containsKey("deploy"))
+        {
+            destMap.put("deploy", ((String)destMap.get("war"))+"/"+portalName+"/WEB-INF/deploy");
+        }
+        if (!destMap.containsKey("local"))
+        {
+            destMap.put("local", ((String)destMap.get("deploy"))+"/local");
+        }
+        if (!destMap.containsKey("server-conf"))
+        {
+            destMap.put("server-conf", "conf");
+        }
+        if (!destMap.containsKey("server-lib"))
+        {
+            destMap.put("server-lib", "lib");
+        }
     }
 }	



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