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 vk...@apache.org on 2009/02/10 15:22:53 UTC
svn commit: r742979 - in /portals/jetspeed-2/portal/trunk:
jetspeed-installer/ jetspeed-installer/etc/ant-installer/
jetspeed-installer/etc/database/ jetspeed-installer/etc/database/import/
jetspeed-installer/etc/database/import/assembly/ jetspeed-inst...
Author: vkumar
Date: Tue Feb 10 14:22:17 2009
New Revision: 742979
URL: http://svn.apache.org/viewvc?rev=742979&view=rev
Log:
Applying Patch for JS2-912, Now jetspeed installer would be packed with Tomcat 6
Thanks Jeroen Hoffman for providing patch
Added:
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties (with props)
Removed:
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/import/assembly/import-page-manager.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/import/assembly/repository-datasource-spring.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/import/import.properties
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/import/log4j.properties
Modified:
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/build.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/build.xml
portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.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/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml?rev=742979&r1=742978&r2=742979&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml Tue Feb 10 14:22:17 2009
@@ -44,7 +44,7 @@
<page type="input" name="requiredComponents" displayText="Components selection">
<comment displayText="Jetspeed Enterprise Portal version 2.2-SNAPSHOT" bold="true" />
- <target displayText="Tomcat 5.5.27 Webserver" target="install" defaultValue="true" force="true" />
+ <target displayText="Tomcat 6.0.18 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" />
@@ -196,20 +196,20 @@
<page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
ifProperty="(${checkdb}=true) AND (${dbvalid}=false)">
<hidden property="checkdb" value="false" />
- <hidden property="setupDBAntTarget" value="setupNoDB" />
+ <hidden property="setupDBAntTarget" value="runSetupNoDB" />
<comment displayText="Please go back and specify the correct database configuration parameters." bold="true" />
<comment displayText="" />
<comment displayText="Continuing now will otherwise require manual setup of the database."/>
</page>
- <page type="input" name="beforeInstall" displayText="Before your install.." ifProperty="(${dbName}=manual) OR (${setupDBAntTarget}=setupNoDB)">
+ <page type="input" name="beforeInstall" displayText="Before your install.." ifProperty="(${dbName}=manual) OR (${setupDBAntTarget}=runSetupNoDB)">
<hidden property="db.username" value="" />
<hidden property="db.password" value="" />
<hidden property="jdbc.url" value="" />
<hidden property="jdbc.driver.class" value="" />
<hidden property="jdbc.driver.jar" value="" />
- <hidden property="setupDBAntTarget" value="setupNoDB" />
+ <hidden property="setupDBAntTarget" value="runSetupNoDB" />
<comment displayText="Jetspeed will be installed without yet a configured database to:" bold="true"/>
<comment displayText=" ${installDir}"/>
<comment displayText="Warning: all content in this directory will be deleted first!" bold="true"/>
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=742979&r1=742978&r2=742979&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 Tue Feb 10 14:22:17 2009
@@ -44,7 +44,7 @@
<page type="input" name="requiredComponents" displayText="Components selection">
<comment displayText="Jetspeed Enterprise Portal version 2.2-SNAPSHOT" bold="true" />
- <target displayText="Tomcat 5.5.27 Webserver" target="install" defaultValue="true" force="true" />
+ <target displayText="Tomcat 6.0.18 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" />
@@ -199,20 +199,20 @@
<page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
ifProperty="(${checkdb}=true) AND (${dbvalid}=false)">
<hidden property="checkdb" value="false" />
- <hidden property="setupDBAntTarget" value="setupNoDB" />
+ <hidden property="setupDBAntTarget" value="runSetupNoDB" />
<comment displayText="Please go back and specify the correct database configuration parameters." bold="true" />
<comment displayText="" />
<comment displayText="Continuing now will otherwise require manual setup of the database."/>
</page>
- <page type="input" name="beforeInstall" displayText="Before your install.." ifProperty="(${dbName}=manual) OR (${setupDBAntTarget}=setupNoDB)">
+ <page type="input" name="beforeInstall" displayText="Before your install.." ifProperty="(${dbName}=manual) OR (${setupDBAntTarget}=runSetupNoDB)">
<hidden property="db.username" value="" />
<hidden property="db.password" value="" />
<hidden property="jdbc.url" value="" />
<hidden property="jdbc.driver.class" value="" />
<hidden property="jdbc.driver.jar" value="" />
- <hidden property="setupDBAntTarget" value="setupNoDB" />
+ <hidden property="setupDBAntTarget" value="runSetupNoDB" />
<comment displayText="Jetspeed will be installed without yet a configured database to:" bold="true"/>
<comment displayText=" ${installDir}"/>
<comment displayText="Warning: all content in this directory will be deleted first!" bold="true"/>
Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/build.xml?rev=742979&r1=742978&r2=742979&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/build.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/ant-installer/build.xml Tue Feb 10 14:22:17 2009
@@ -56,7 +56,7 @@
</condition>
<property name="jdbcjar" value="${jdbc.driver.jar}" />
- <copy failonerror="false" todir="${installDir}/shared/lib" file="${jdbcjar}" />
+ <copy failonerror="false" todir="${installDir}/lib" file="${jdbcjar}" />
<move file="${installDir}/database/database.properties.template" tofile="${installDir}/database/database.properties"
overwrite="true">
Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/build.xml?rev=742979&r1=742978&r2=742979&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/build.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/build.xml Tue Feb 10 14:22:17 2009
@@ -72,33 +72,33 @@
</target>
- <target name="setupNoDB">
- <antcall target="setupDBPSML" />
- </target>
+ <target name="runSetupDB" depends="checkDerby,checkImportPsml,generateStandardDB,generateDerbyDB,copyJetspeedContext,filterSpringFilterKey,seedDB,dbPsml" />
+
+ <target name="runSetupNoDB" depends="checkImportPsml,copyJetspeedContext,filterSpringFilterKey" />
<target name="checkInput" unless="failSetup">
<antcall target="runSetupDB" />
</target>
- <target name='setupDBPSML'>
- <copy file="${jetspeedWebInfDir}/assembly/page-manager.xml" tofile="${jetspeedWebInfDir}/assembly/alternate/fs-page-manager.xml" />
- </target>
-
- <target name="runSetupDB" depends="setupDBPSML,checkDerby,generateStandardDB,generateDerbyDB,copyJetspeedContext,filterSpringDatasource,seedDB,do-psml" />
-
<target name="checkDerby">
<condition property="_derby">
<equals arg1="${db.type}" arg2="derby" />
</condition>
</target>
+ <target name="checkImportPsml">
+ <condition property="_doImportPsml">
+ <equals arg1="${dbImportPsml}" arg2="true" />
+ </condition>
+ </target>
+
<target name="generateDerbyDB" if="_derby">
<delete dir="${basedir}/derby/productiondb" quiet="true" />
<echo>Executing file ${basedir}/derby/create-schema.sql</echo>
<java classname="org.apache.jetspeed.anttasks.ExecuteJavaSQL" fork="yes">
<classpath>
- <fileset dir="${basedir}/../shared/lib">
+ <fileset dir="${basedir}/../lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${jetspeedWebInfDir}/lib">
@@ -107,10 +107,7 @@
<fileset dir="${basedir}/lib">
<include name="**/*.jar" />
</fileset>
- <fileset dir="${basedir}/../common/lib">
- <include name="**/*.jar" />
- </fileset>
- <pathelement location="${basedir}/../shared/classes" />
+ <pathelement location="${basedir}/../lib" />
<pathelement location="${jetspeedWebInfDir}/classes" />
</classpath>
<arg line="driver="${_jdbc.driver.class}"
@@ -127,7 +124,7 @@
<sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}" src="${basedir}/${db.type}/drop-schema.sql" autocommit="true" onerror="continue" print="no" output="setup.log">
<classpath>
- <fileset dir="${basedir}/../shared/lib">
+ <fileset dir="${basedir}/../lib">
<include name="**/*.jar" />
</fileset>
</classpath>
@@ -136,7 +133,7 @@
<echo>Starting database generation</echo>
<sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}" src="${basedir}/${db.type}/create-schema.sql">
<classpath>
- <fileset dir="${basedir}/../shared/lib">
+ <fileset dir="${basedir}/../lib">
<include name="**/*.jar" />
</fileset>
</classpath>
@@ -146,7 +143,7 @@
</target>
<target name="copyJetspeedContext">
- <copy file="${portalName}.xml" tofile="${basedir}/../conf/Catalina/localhost/${portalName}.xml" overwrite="true">
+ <copy file="resources/${portalName}.xml" tofile="${basedir}/../conf/Catalina/localhost/${portalName}.xml" overwrite="true">
<!-- note that the $ is escaped here -->
<filterset begintoken="$${" endtoken="}">
@@ -158,18 +155,30 @@
</copy>
</target>
- <target name="filterSpringDatasource">
- <copy file="${jetspeedWebInfDir}/assembly/boot/datasource.xml" tofile="${jetspeedWebInfDir}/assembly/boot/datasource_filtered.xml">
+ <target name="filterSpringFilterKey">
+ <delete quiet="true" file="${jetspeedWebInfDir}/conf/spring-filter-key.properties" />
+
+ <!-- Ant's if/else simulation, _doImportPsml has been set before -->
+ <antcall target="filterSpringFilterKey_db"/>
+ <antcall target="filterSpringFilterKey_file"/>
+ </target>
+
+ <target name="filterSpringFilterKey_db" if="_doImportPsml">
+ <copy file="resources/spring-filter-key.properties" todir="${jetspeedWebInfDir}/conf/">
+ <!-- note that the $ is escaped here -->
+ <filterset begintoken="$${" endtoken="}">
+ <filter token="org.apache.jetspeed.spring.filter.key" value="portal.dbPageManager" />
+ </filterset>
+ </copy>
+ </target>
+
+ <target name="filterSpringFilterKey_file" unless="_doImportPsml">
+ <copy file="resources/spring-filter-key.properties" todir="${jetspeedWebInfDir}/conf/">
<!-- note that the $ is escaped here -->
<filterset begintoken="$${" endtoken="}">
- <filter token="org.apache.jetspeed.database.user" value="${_db.username}" />
- <filter token="org.apache.jetspeed.database.password" value="${_db.password}" />
- <filter token="org.apache.jetspeed.database.driver" value="${_jdbc.driver.class}" />
- <filter token="org.apache.jetspeed.database.url" value="${_jdbc.url}" />
+ <filter token="org.apache.jetspeed.spring.filter.key" value="portal" />
</filterset>
</copy>
- <move file="${jetspeedWebInfDir}/assembly/boot/datasource_filtered.xml" tofile="${jetspeedWebInfDir}/assembly/boot/datasource.xml" overwrite="true" />
- <delete file="${jetspeedWebInfDir}/assembly/boot/datasource_filtered.xml" />
</target>
<target name="seedDB">
@@ -178,7 +187,7 @@
<java classname="org.apache.jetspeed.tools.db.serializer.JetspeedSerializerApplicationImpl" fork="yes">
<classpath>
- <fileset dir="${basedir}/../shared/lib">
+ <fileset dir="${basedir}/../lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${jetspeedWebInfDir}/lib">
@@ -187,14 +196,16 @@
<fileset dir="${basedir}/lib">
<include name="**/*.jar" />
</fileset>
- <fileset dir="${basedir}/../common/lib">
- <include name="**/*.jar" />
- </fileset>
- <pathelement location="${basedir}/../shared/classes" />
+ <pathelement location="${basedir}/../lib" />
<pathelement location="${jetspeedWebInfDir}/classes" />
</classpath>
- <arg line="-I "${basedir}/j2-seed.xml"
+ <sysproperty key="org.apache.jetspeed.database.user" value="${_db.username}"/>
+ <sysproperty key="org.apache.jetspeed.database.password" value="${_db.password}"/>
+ <sysproperty key="org.apache.jetspeed.database.url" value="${_jdbc.url}"/>
+ <sysproperty key="org.apache.jetspeed.database.driver" value="${_jdbc.driver.class}"/>
+
+ <arg line="-I "${basedir}/resources/j2-seed.xml"
-a "${basedir}/../webapps/${portalName}"
-c "serializer"
-p "${jetspeedWebInfDir}/conf/spring-filter.properties"" />
@@ -202,42 +213,30 @@
</target>
- <!-- Populate database with pages the user has selected so -->
- <target name="do-psml" depends="test-import-psml,db-psml,fs-psml" />
-
- <target name="test-import-psml">
- <condition property="_doImportPsml">
- <equals arg1="${dbImportPsml}" arg2="true" />
- </condition>
- </target>
-
- <target name="fs-psml" unless="_doImportPsml">
- <copy file="${jetspeedWebInfDir}/assembly/alternate/fs-page-manager.xml" tofile="${jetspeedWebInfDir}/assembly/page-manager.xml" overwrite="true" />
- <delete quiet="true" file="${jetspeedWebInfDir}/assembly/interceptors.xml" />
- </target>
-
- <target name="db-psml" if="_doImportPsml">
+ <target name="dbPsml" if="_doImportPsml">
<echo>Importing psml into the database</echo>
<java classname="org.apache.jetspeed.tools.page.serializer.JetspeedPageSerializerApplicationImpl" fork="yes">
<classpath>
- <fileset dir="${basedir}/../shared/lib">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="${jetspeedWebInfDir}/lib">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="${basedir}/lib">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="${basedir}/../common/lib">
- <include name="**/*.jar" />
- </fileset>
- <pathelement location="${basedir}/../shared/classes" />
- <pathelement location="${jetspeedWebInfDir}/classes" />
+ <fileset dir="${basedir}/../lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="${jetspeedWebInfDir}/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="${basedir}/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <pathelement location="${basedir}/../lib" />
+ <pathelement location="${jetspeedWebInfDir}/classes" />
</classpath>
+ <sysproperty key="org.apache.jetspeed.database.user" value="${_db.username}"/>
+ <sysproperty key="org.apache.jetspeed.database.password" value="${_db.password}"/>
+ <sysproperty key="org.apache.jetspeed.database.url" value="${_jdbc.url}"/>
+ <sysproperty key="org.apache.jetspeed.database.driver" value="${_jdbc.driver.class}"/>
+
<arg
line="-I "/"
-a "${basedir}/../webapps/${portalName}"
Added: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties?rev=742979&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties Tue Feb 10 14:22:17 2009
@@ -0,0 +1,17 @@
+# 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.
+
+# Use this to override settings in jetspeed.properties
+spring.filter.key=${org.apache.jetspeed.spring.filter.key}
Propchange: portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml?rev=742979&r1=742978&r2=742979&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml Tue Feb 10 14:22:17 2009
@@ -112,10 +112,18 @@
</exclusion>
<exclusion>
<groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-rdbms</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-registry</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-sso</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-id-generator</artifactId>
</exclusion>
<exclusion>
@@ -142,6 +150,14 @@
<groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-serializer</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-ojb</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -179,9 +195,8 @@
<configuration>
<tasks>
<copy file="${project.build.directory}/resources/tomcat/context.xml"
- tofile="${project.build.directory}/database/${org.apache.jetspeed.portal.context.name}.xml"
- />
- </tasks>
+ tofile="${project.build.directory}/database/resources/${org.apache.jetspeed.portal.context.name}.xml" />
+ </tasks>
</configuration>
<goals>
<goal>run</goal>
@@ -215,11 +230,7 @@
<resource>
<path>@seed.path@</path>
<include>j2-seed.xml</include>
- <destination>database</destination>
- </resource>
- <resource>
- <path>db-ojb</path>
- <destination>database/import/db-ojb</destination>
+ <destination>database/resources</destination>
</resource>
<resource>
<path>ddl</path>
@@ -265,3 +276,6 @@
</build>
</project>
+
+
+
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=742979&r1=742978&r2=742979&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 Tue Feb 10 14:22:17 2009
@@ -38,10 +38,12 @@
<packaging>pom</packaging>
<properties>
+ <tomcat.version.major>6</tomcat.version.major>
+ <tomcat.version.minor>6.0.18</tomcat.version.minor>
+ <tomcat.name>apache-tomcat-${tomcat.version.minor}</tomcat.name>
<org.apache.portals.jetspeed.version>${pom.version}</org.apache.portals.jetspeed.version>
<org.apache.jetspeed.portal.context.name>jetspeed</org.apache.jetspeed.portal.context.name>
- <tomcat.version>apache-tomcat-5.5.27</tomcat.version>
- <org.apache.jetspeed.portal.home>${project.build.directory}/${tomcat.version}</org.apache.jetspeed.portal.home>
+ <org.apache.jetspeed.portal.home>${project.build.directory}/${tomcat.name}</org.apache.jetspeed.portal.home>
</properties>
<build>
@@ -67,16 +69,13 @@
<tasks>
<mkdir dir="resources"/>
<get usetimestamp="true"
- src="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.27/bin/${tomcat.version}.zip"
- dest="resources/${tomcat.version}.zip"/>
- <unzip src="resources/${tomcat.version}.zip" dest="${project.build.directory}"
+ src="http://archive.apache.org/dist/tomcat/tomcat-${tomcat.version.major}/v${tomcat.version.minor}/bin/${tomcat.name}.zip"
+ dest="resources/${tomcat.name}.zip"/>
+ <unzip src="resources/${tomcat.name}.zip" dest="${project.build.directory}"
overwrite="false"/>
- <delete dir="${org.apache.jetspeed.portal.home}/webapps/balancer"/>
- <delete dir="${org.apache.jetspeed.portal.home}/webapps/jsp-examples"/>
- <delete dir="${org.apache.jetspeed.portal.home}/webapps/servlets-examples"/>
- <delete dir="${org.apache.jetspeed.portal.home}/webapps/tomcat-docs"/>
- <delete dir="${org.apache.jetspeed.portal.home}/webapps/webdav"/>
+ <delete dir="${org.apache.jetspeed.portal.home}/webapps/examples"/>
+ <delete dir="${org.apache.jetspeed.portal.home}/webapps/docs"/>
</tasks>
</configuration>
<goals>
@@ -145,6 +144,7 @@
<configuration>
<targetBaseDir>${org.apache.jetspeed.portal.home}</targetBaseDir>
<portalName>${org.apache.jetspeed.portal.context.name}</portalName>
+ <profile>tomcat${tomcat.version.major}</profile>
<destinations>
<context>webapps/jetspeed/META-INF</context>
</destinations>
@@ -310,6 +310,7 @@
<configuration>
<targetBaseDir>${org.apache.jetspeed.portal.home}</targetBaseDir>
<portalName>${org.apache.jetspeed.portal.context.name}</portalName>
+ <profile>tomcat${tomcat.version.major}</profile>
<destinations>
<context>webapps/jetspeed/META-INF</context>
</destinations>
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=742979&r1=742978&r2=742979&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 Tue Feb 10 14:22:17 2009
@@ -27,7 +27,7 @@
</formats>
<fileSets>
<fileSet>
- <directory>target/${tomcat.version}</directory>
+ <directory>target/${tomcat.name}</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
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=742979&r1=742978&r2=742979&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 Tue Feb 10 14:22:17 2009
@@ -54,6 +54,10 @@
{
private static final String DEPLOY_FACTORY_CLASS_NAME = "org.apache.jetspeed.tools.deploy.JetspeedDeployFactory";
+ private static final String PROFILE_TOMCAT5 = "tomcat5";
+ private static final String PROFILE_TOMCAT6 = "tomcat6";
+ private static final String DEFAULT_PROFILE = PROFILE_TOMCAT5;
+
public static class Deployment
{
private String artifact;
@@ -123,6 +127,11 @@
/** @parameter expression="${plugin.introducedDependencyArtifacts}" */
private Set pluginDependencyArtifacts;
+ /**
+ * @parameter
+ */
+ private String profile;
+
private Artifacts artifacts;
/* (non-Javadoc)
@@ -135,27 +144,8 @@
{
destMap.putAll(destinations);
}
- // init default for tomcat5.5
- 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");
- }
+
+ initDefaultDestinations(destMap, (profile != null) ? profile : DEFAULT_PROFILE);
File targetBaseDir = new File(this.targetBaseDir);
if (targetBaseDir.exists() && targetBaseDir.isFile())
@@ -476,8 +466,8 @@
}
}
}
-
- private static String getValue(String value, String defaultValue)
+
+ private static String getValue(String value, String defaultValue)
{
return value != null ? value : defaultValue;
}
@@ -653,4 +643,62 @@
}
}
}
-}
+
+ /**
+ * Initialize default destinations for a certain profile.
+ */
+ private void initDefaultDestinations(Map destMap, String profile) throws MojoFailureException {
+
+ if (!(profile.equals(PROFILE_TOMCAT5) || profile.equals(PROFILE_TOMCAT6))) {
+ throw new MojoFailureException("Cannot handle profile '" + profile + "', use '"
+ + PROFILE_TOMCAT5 + "' or '" + PROFILE_TOMCAT6 + "'");
+ }
+
+ if (profile.equals(PROFILE_TOMCAT5)) {
+
+ 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");
+ }
+ }
+ else if (profile.equals(PROFILE_TOMCAT6)) {
+
+ 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");
+ }
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org