summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:11:48 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:11:48 +0000
commitece4fd35da7b7fc76264776f81705e6b5b52d3e0 (patch)
tree962794e2a2b1ab91a02c41e4927a527cade83959 /sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay
parent76e9f96ca7f494088fe3af5a46ad0d153e961008 (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835140 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay')
-rw-r--r--sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/configureTomcat.xml425
-rw-r--r--sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/context.xsl96
-rw-r--r--sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/datasource.xsl39
-rw-r--r--sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/pom.xml121
-rw-r--r--sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/server.xsl49
5 files changed, 730 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/configureTomcat.xml b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/configureTomcat.xml
new file mode 100644
index 0000000000..32407b4e88
--- /dev/null
+++ b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/configureTomcat.xml
@@ -0,0 +1,425 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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 name="setup tomcat" default="prepareTomcat" basedir='.'>
+ <property environment="env" />
+ <property file="${user.home}/tuscany/build.properties" />
+ <property file="${user.home}/build.properties" />
+ <property name="wsbinding" value="axis2" />
+
+ <property name="tuscany.acceptance.tomcat.version" value='5.5.17' />
+ <condition property="tuscany.acceptance.tomcat.zipped" value='apache-tomcat-${tuscany.acceptance.tomcat.version}.zip'>
+ <os family="windows" />
+ </condition>
+ <condition property="tuscany.acceptance.tomcat.zipped" value='apache-tomcat-${tuscany.acceptance.tomcat.version}.tar.gz'>
+ <or>
+ <os family="unix" />
+ <os family="mac" />
+ </or>
+ </condition>
+ <condition property="ant.home" value="${env.ANT_HOME}">
+ <os family="unix" />
+ </condition>
+
+ <property name="tuscany.acceptance.target.dir" value='${target.dir}' />
+
+ <condition property="tuscany.acceptance.target.dir" value="target">
+ <not>
+ <isset property="target.dir" />
+ </not>
+ </condition>
+
+ <property name="tuscany.acceptance.tc.dir" value='${tuscany.acceptance.target.dir}/apache-tomcat-${tuscany.acceptance.tomcat.version}' />
+
+ <!-- KJW define property for the complete path of apache dir -->
+ <property name="fullpath.tuscany.acceptance.tc.dir" value= '${tuscany.acceptance.tc.dir}' />
+
+
+ <property name="tuscany.acceptance.groupId" value='org/apache/tuscany' />
+ <property name="tuscany.acceptance.version" value='incubating-M1' />
+
+ <property name="tuscany.sca.acceptance.groupId" value='org/osoa' />
+ <property name="tuscany.sca.acceptance.version" value='incubating-M1' />
+
+ <property name="tuscany.commonj.acceptance.groupId" value='commonj' />
+ <property name="tuscany.commonj.acceptance.version" value='incubating-M1' />
+
+ <property name="tuscany.sdo.acceptance.groupId" value='org/apache/tuscany' />
+ <property name="tuscany.sdo.acceptance.version" value='incubating-M1' />
+
+ <property name="tuscany.acceptance.axis2.version" value='1.0' />
+
+ <property name="tuscany.acceptance.bindings" value='org/apache/tuscany/sca/bindings' />
+ <property name="tuscany.acceptance.containers" value='org/apache/tuscany/sca/containers' />
+ <property name="tuscany.acceptance.databindings" value='org/apache/tuscany/databinding' />
+ <property name="tuscany.acceptance.sca.samples.dir" value='../../samples' />
+ <property name="tuscany.acceptance.samples.dir" value='../../sampleapps' />
+ <property name="tuscany.acceptance.interop.dir" value='../../testing/interop' />
+
+ <!--KJW Define location of canned Derby database -->
+ <property name="tuscany.acceptance.das.samples.companyweb.dir" value='../../samples/das/companyweb' />
+
+ <!-- property name="tuscany.maven.repos.dir" value='${user.home}\.maven\repository' / -->
+ <!-- change for maven 2.0 -->
+ <property name="tuscany.maven.repos.dir" value='${user.home}\.m2\repository' />
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+ <condition property="isUnix">
+ <os family="unix" />
+ </condition>
+ <condition property="isMac">
+ <os family="mac" />
+ </condition>
+
+ <patternset id="tuscany.acceptance.common.dependencies">
+ <include name="**/stax/stax-api/1.0/stax-api-1.0.jar" />
+ <include name="**/woodstox/wstx-asl/2.9.3/wstx-asl-2.9.3.jar" />
+ </patternset>
+
+ <patternset id="tuscany.acceptance.javascript.dependencies">
+ <include name="**/rhino/js/1.6R2/js-1.6R2.jar" />
+ <include name="**/xmlbeans/xbean/2.1.0/xbean-2.1.0.jar" />
+ </patternset>
+
+ <patternset id="tuscany.acceptance.emf.dependencies">
+ <include name="**/org/eclipse/emf/common/2.2.0-RC4/common-2.2.0-RC4.jar" />
+ <include name="**/org/eclipse/emf/ecore/2.2.0-RC4/ecore-2.2.0-RC4.jar" />
+ <include name="**/org/eclipse/emf/ecore-change/2.2.0-RC4/ecore-change-2.2.0-RC4.jar" />
+ <include name="**/org/eclipse/emf/ecore-xmi/2.2.0-RC4/ecore-xmi-2.2.0-RC4.jar" />
+ <include name="**/org/eclipse/xsd/xsd/2.2.0-RC4/xsd-2.2.0-RC4.jar" />
+ </patternset>
+
+ <patternset id="tuscany.acceptance.tc.specsdoimpl">
+ <!--jars which need to go into tomcat common/lib -->
+ <include name="**/${tuscany.sca.acceptance.groupId}/sca-api/${tuscany.sca.acceptance.version}/sca-api-${tuscany.sca.acceptance.version}.jar" />
+ <include name="**/${tuscany.commonj.acceptance.groupId}/sdo-api/${tuscany.commonj.acceptance.version}/sdo-api-${tuscany.commonj.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.groupId}/tuscany-sdo-impl/${tuscany.acceptance.version}/tuscany-sdo-impl-${tuscany.acceptance.version}.jar" />
+ </patternset>
+
+ <patternset id="tuscany.acceptance.sca.core">
+ <!--jars which need to go into tomcat server/lib -->
+ <include name="**/${tuscany.acceptance.groupId}/tuscany-common/${tuscany.acceptance.version}/tuscany-common-${tuscany.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.containers}/tuscany-container-java/${tuscany.acceptance.version}/tuscany-container-java-${tuscany.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.containers}/tuscany-container-rhino/${tuscany.acceptance.version}/tuscany-container-rhino-${tuscany.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.databindings}/tuscany-databinding-sdo/${tuscany.acceptance.version}/tuscany-databinding-sdo-${tuscany.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.groupId}/tuscany-core/${tuscany.acceptance.version}/tuscany-core-${tuscany.acceptance.version}.jar" />
+ <include name="**/${tuscany.acceptance.groupId}/tuscany-model/${tuscany.acceptance.version}/tuscany-model-${tuscany.acceptance.version}.jar" />
+
+ <include name="**/wsdl4j/wsdl4j/1.5.2/wsdl4j-1.5.2.jar" />
+ <include name="**/org/apache/geronimo/geronimo-connector/1.0/geronimo-connector-1.0.jar" />
+ <include name="**/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.0/geronimo-j2ee-connector_1.5_spec-1.0.jar" />
+ <include name="**/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0/geronimo-jta_1.0.1B_spec-1.0.jar" />
+ <include name="**/org/apache/geronimo/geronimo-transaction/1.0/geronimo-transaction-1.0.jar" />
+ <include name="**/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar" />
+ <include name="**/asm/asm/2.2/asm-2.2.jar" />
+ <include name="**/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" />
+ </patternset>
+
+ <patternset id="tuscany.acceptance.binding.axis2">
+ <include name="**/${tuscany.acceptance.bindings}/tuscany-binding-axis2/${tuscany.acceptance.version}/tuscany-binding-axis2-${tuscany.acceptance.version}.jar" />
+ <include name="**/axis2/axis2-kernel/${tuscany.acceptance.axis2.version}/axis2-kernel-${tuscany.acceptance.axis2.version}.jar" />
+ <include name="**/ws-commons/axiom-api/1.0/axiom-api-1.0.jar" />
+ <include name="**/ws-commons/axiom-impl/1.0/axiom-impl-1.0.jar" />
+ <include name="**/ws-commons/neethi/1.0.1/neethi-1.0.1.jar" />
+ <include name="**/org/apache/ws/commons//XmlSchema/1.0.2/XmlSchema-1.0.2.jar" />
+ <include name="**/commons-httpclient/commons-httpclient/3.0/commons-httpclient-3.0.jar" />
+ <include name="**/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" />
+ </patternset>
+
+ <property name="celtix.version" value="1.0" />
+ <patternset id="tuscany.acceptance.binding.celtix">
+ <include name="**/${tuscany.acceptance.bindings}/tuscany-binding-celtix/${tuscany.acceptance.version}/tuscany-binding-celtix-${tuscany.acceptance.version}.jar" />
+ <include name="**/org/objectweb/celtix/celtix-rt/${celtix.version}/celtix-rt-${celtix.version}.jar" />
+ <include name="**/org/objectweb/celtix/celtix-api/${celtix.version}/celtix-api-${celtix.version}.jar" />
+ <include name="**/org/objectweb/celtix/celtix-common/${celtix.version}/celtix-common-${celtix.version}.jar" />
+ <include name="**/org/objectweb/celtix/celtix-tools/${celtix.version}/celtix-tools-${celtix.version}.jar" />
+
+ <include name="**/com/sun/xml/jaxb-impl/2.0EA3/jaxb-impl-2.0EA3.jar" />
+ <include name="**/com/sun/xml/jaxb-xjc/2.0EA3/jaxb-xjc-2.0EA3.jar" />
+ <include name="**/com/sun/xml/saaj-impl/1.3/saaj-impl-1.3.jar" />
+ <include name="**/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
+ <include name="**/javax/annotation/jsr250-api/2.0-JAXWS-2.0-EA3/jsr250-api-2.0-JAXWS-2.0-EA3.jar" />
+ <include name="**/javax/jws/jsr181-api/2.0-JAXWS-2.0-EA3/jsr181-api-2.0-JAXWS-2.0-EA3.jar" />
+ <include name="**/javax/xml/jaxb-api/2.0EA3/jaxb-api-2.0EA3.jar" />
+ <include name="**/javax/xml/jaxws-api/2.0-JAXWS-2.0-EA3/jaxws-api-2.0-JAXWS-2.0-EA3.jar" />
+ <include name="**/javax/xml/saaj-api/1.3/saaj-api-1.3.jar" />
+ <include name="**/jetty/org.mortbay.jetty/5.1.9/org.mortbay.jetty-5.1.9.jar" />
+ <include name="**/org/springframework/spring-beans/1.2.5/spring-beans-1.2.5.jar" />
+ <include name="**/org/springframework/spring-core/1.2.5/spring-core-1.2.5.jar" />
+ <include name="**/regexp/regexp/1.3/regexp-1.3.jar" />
+ <include name="**/velocity/velocity-dep/1.4/velocity-dep-1.4.jar" />
+ <include name="**/velocity/velocity/1.4/velocity-1.4.jar" />
+ <include name="**/wsdl4j/wsdl4j/1.5.2/wsdl4j-1.5.2.jar" />
+
+ <include name="**/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.0/geronimo-activation_1.0.2_spec-1.0.jar" />
+ <include name="**/asm/asm/2.2/asm-2.2.jar" />
+ </patternset>
+
+ <target name="init">
+ <available property='tomcat.is.available' file='${tuscany.acceptance.tc.dir}/server/lib/catalina.jar' type='file' />
+ <available property='tuscany.acceptance.tomcat.zipped.available' file='${tuscany.acceptance.tomcat.zipped}' type='file' />
+ <available property='tuscany.acceptance.tomcat.serverxmlorg.available' file='${tuscany.acceptance.tc.dir}/conf/server.xml.original' />
+ <available property='tuscany.acceptance.tomcat.contextxmlorg.available' file='${tuscany.acceptance.tc.dir}/conf/context.xml.original' />
+ </target>
+
+ <target name="check.for.zip" depends="init" unless='tuscany.acceptance.tomcat.zipped.available'>
+ <property name='tuscany.acceptance.tomcat.zipped.full' location="${tuscany.acceptance.tomcat.zipped}" />
+ <echo level="error" message="${tuscany.acceptance.tomcat.zipped} file not found here:'${tuscany.acceptance.tomcat.zipped.full}'" />
+ <echo level="error" message="Either place zip file there or change ${user.home}/build.properties in home dir to include 'tuscany.acceptance.tomcat.zipped' property to where zip is located. " />
+ <fail />
+ </target>
+
+
+ <target name="tuscany.tomcat.unzipWindows" if="isWindows" depends='init,check.for.zip' description='Just unzip tomcat' unless='tomcat.is.available'>
+ <unzip src="${tuscany.acceptance.tomcat.zipped}" dest="${tuscany.acceptance.target.dir}" />
+ </target>
+ <target name="tuscany.tomcat.unzipUnix" if="isUnix" depends='init,check.for.zip' description='Just unzip tomcat' unless='tomcat.is.available'>
+ <mkdir dir="${tuscany.acceptance.target.dir}" />
+ <gunzip src="${tuscany.acceptance.tomcat.zipped}" dest="${tuscany.acceptance.target.dir}/temp.tar" />
+ <!-- Exec tar because ant builtin tar does not preserve execute permissions. -->
+ <exec executable="tar" dir="${tuscany.acceptance.target.dir}">
+ <arg value="xf" />
+ <arg value="temp.tar" />
+ </exec>
+ <delete file="${tuscany.acceptance.target.dir}/temp.tar" />
+ </target>
+ <target name="tuscany.tomcat.unzipMac" if="isMac" depends='init,check.for.zip' description='Just unzip tomcat' unless='tomcat.is.available'>
+ <antcall target="tuscany.tomcat.unzipUnix" />
+ <!-- just use unix for now -->
+ </target>
+
+ <target name="prepareTomcat" depends='tuscany.tomcat.unzipWindows,tuscany.tomcat.unzipUnix,tuscany.tomcat.unzipMac,tuscany.tomcat.fixup,tuscany.deploy.samples,tuscany.deploy.das.standalone' description='Unzip tomcat, fix it up, and deploy samples'>
+ <dirname property='tuscany.acceptance.tc.dir.full' file="${tuscany.acceptance.tc.dir}/bin" />
+ <echo level="info" message="Tomcat fixed up here: ${tuscany.acceptance.tc.dir.full}" />
+
+ </target>
+ <target name="startTestServer" depends='prepareTomcat' description='start server prepared to run tests'>
+ <waitfor maxwait="1" maxwaitunit="second" checkevery="200" timeoutproperty="tuscany.tomcat.notstarted">
+ <http url="http://localhost:8080" />
+ </waitfor>
+ <condition property="tuscany.tomcat.alreadystarted">
+ <not>
+ <istrue value="${tuscany.tomcat.notstarted}" />
+ </not>
+ </condition>
+ <antcall target="startTomcat" />
+ </target>
+
+ <target name="tuscany.tomcat.fixup" depends='tuscany.tomcat.fixserverconfig' description='Fix up tomcat for tuscany.'>
+ <mkdir dir="${tuscany.acceptance.target.dir}" />
+
+ <copy todir="${tuscany.acceptance.tc.dir}/common/lib" flatten='true'>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.emf.dependencies" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.tc.specsdoimpl" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset>
+ <!-- for Derby and DAS support -->
+ <include name="**/${tuscany.acceptance.groupId}/das/tuscany-das-rdb/${tuscany.acceptance.version}/tuscany-das-rdb-${tuscany.acceptance.version}.jar" />
+ <include name="**/org/apache/derby/derby/10.1.2.1/derby-10.1.2.1.jar" />
+ </patternset>
+ <patternset>
+ <!-- for JSON-RPC support -->
+ <include name="**/metaparadigm/jsonrpc/1.0/jsonrpc-1.0.jar" />
+ </patternset>
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.common.dependencies" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.javascript.dependencies" />
+ </fileset>
+ </copy>
+ <copy todir="${tuscany.acceptance.tc.dir}/server/lib" flatten='true'>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.sca.core" />
+ <patternset>
+ <include name="**/${tuscany.acceptance.groupId}/tuscany-tomcat/${tuscany.acceptance.version}/tuscany-tomcat-${tuscany.acceptance.version}.jar" />
+ </patternset>
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.binding.${wsbinding}" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset>
+ <include name="**/${tuscany.acceptance.bindings}/tuscany-binding-jsonrpc/${tuscany.acceptance.version}/tuscany-binding-jsonrpc-${tuscany.acceptance.version}.jar" />
+ </patternset>
+ </fileset>
+
+ </copy>
+ </target>
+
+ <target name="tuscany.deploy.samples" description='Deploy tuscany sample wars to tomcat webapps.'>
+ <copy todir="${tuscany.acceptance.tc.dir}/webapps" flatten='true'>
+ <fileset dir="${tuscany.acceptance.sca.samples.dir}">
+ <include name="**/*.war" />
+ </fileset>
+ <fileset dir="${tuscany.acceptance.samples.dir}">
+ <include name="**/*.war" />
+ </fileset>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*-incubating-M1.war" to="*.war"/>
+ </chainedmapper>
+ </copy>
+ </target>
+
+
+ <!-- DAS standalone target -->
+ <target name="tuscany.deploy.das.standalone" description='Deploy DAS stand alone sample to tomcat.'>
+
+
+ <!-- Create directory for the derby database -->
+ <property name="tuscany.acceptance.target.databases.dir" value='${tuscany.acceptance.tc.dir}/Databases' />
+ <mkdir dir="${tuscany.acceptance.target.databases.dir}" />
+
+ <!-- Copy over the Derby database -->
+ <copy todir="${tuscany.acceptance.target.databases.dir}">
+ <fileset dir="${tuscany.acceptance.das.samples.companyweb.dir}">
+ <include name="**/dastest/**" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- provide a convenient -Djava.ext.dirs= to run j2se samples -->
+ <target name="j2se" description='create a java extensions directory to run J2SE tuscany applications.'>
+ <property name="tuscany.acceptance.j2se.dir" value='${tuscany.acceptance.target.dir}/j2se' />
+ <mkdir dir="${tuscany.acceptance.j2se.dir}" />
+ <copy todir="${tuscany.acceptance.j2se.dir}" flatten='true'>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.common.dependencies" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.emf.dependencies" />
+ <patternset refid="tuscany.acceptance.tc.specsdoimpl" />
+ <patternset refid="tuscany.acceptance.sca.core" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- provide a convenient -Djava.ext.dirs= to run j2se and webservice client samples -->
+ <target name="j2sews" description='create a java extensions directory to run J2SE tuscany applications.'>
+ <property name="tuscany.acceptance.j2sews.dir" value='${tuscany.acceptance.target.dir}/j2sews' />
+
+ <antcall target="j2se" inheritAll='true' inheritRefs='true'>
+ <param name="tuscany.acceptance.j2se.dir" value="${tuscany.acceptance.j2sews.dir}" />
+ </antcall>
+ <copy todir="${tuscany.acceptance.j2sews.dir}" flatten='true'>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.common.dependencies" />
+ </fileset>
+ <fileset dir="${tuscany.maven.repos.dir}">
+ <patternset refid="tuscany.acceptance.binding.${wsbinding}" />
+ </fileset>
+ </copy>
+ </target>
+
+
+ <target name="backup.server.xml" depends="init" unless='tuscany.acceptance.tomcat.serverxmlorg.available'>
+ <copy file='${tuscany.acceptance.tc.dir}/conf/server.xml' tofile='${tuscany.acceptance.tc.dir}/conf/server.xml.original' />
+ </target>
+ <target name="backup.context.xml" depends="init" unless='tuscany.acceptance.tomcat.contextxmlorg.available'>
+ <copy file='${tuscany.acceptance.tc.dir}/conf/context.xml' tofile='${tuscany.acceptance.tc.dir}/conf/context.xml.original' />
+ </target>
+ <target name="tuscany.tomcat.fixserverconfig" depends='tuscany.tomcat.fixserverxml,tuscany.tomcat.fixcontextxml' description='Add listeners' />
+ <target name="tuscany.tomcat.fixserverxml" depends='init,backup.server.xml' unless='tuscany.acceptance.tomcat.serverxmlorg.available'>
+ <property name="tuscany.acceptance.tomcat.serverxmlorg.available" value='true' />
+
+ <!-- KJW save results to server_temp.xml -->
+ <xslt processor="trax"
+ in="${tuscany.acceptance.tc.dir}/conf/server.xml.original"
+ style="server.xsl"
+ out="${tuscany.acceptance.tc.dir}/conf/server_temp.xml">
+ </xslt>
+
+ <!--KJW modify server.xml to include derby database resource -->
+ <echo level="info" message="Running datasource.xsl" />
+ <xslt processor="trax"
+ in="${tuscany.acceptance.tc.dir}/conf/server_temp.xml" style="datasource.xsl" out="${tuscany.acceptance.tc.dir}/conf/server.xml">
+ <param name="database_location" expression="jdbc:derby:../Databases/dastest"/>
+ </xslt>
+
+ <!-- echo message='${user.home}/.axis2/axis2.xml '/ -->
+ <!-- copy file='axis2.xml' tofile='${user.home}/.axis2/axis2.xml' / -->
+ </target>
+ <target name="tuscany.tomcat.fixcontextxml" depends='init,backup.context.xml' unless='tuscany.acceptance.tomcat.contextxmlorg.available'>
+ <property name="tuscany.acceptance.tomcat.contextxmlorg.available" value='true' />
+ <!-- DO NOTHING AT THIS TIME
+ <xslt
+ in="${tuscany.acceptance.tc.dir}/conf/context.xml.original"
+ style="context.xsl" out="${tuscany.acceptance.tc.dir}/conf/context.xml"
+ >
+
+ </xslt>
+ -->
+ </target>
+
+ <target name="startTomcatWindows" if="isWindows" unless='tuscany.tomcat.alreadystarted'>
+ <exec spawn='true' vmlauncher="false" failonerror='false' dir="${tuscany.acceptance.tc.dir}\bin" executable="cmd.exe">
+ <arg line="/C start &quot; Tomcat running ${tuscany.acceptance.tc.dir}&quot; catalina run &amp;&amp; exit" />
+ </exec>
+ </target>
+ <target name="startTomcatUnix" if="isUnix" unless='tuscany.tomcat.alreadystarted'>
+ <echo level="info" message="Starting Tomcat" />
+ <exec spawn='true' vmlauncher="false" failonerror='false' dir="${tuscany.acceptance.tc.dir}/bin" executable="xterm">
+ <arg line="-e ./catalina.sh run" />
+ </exec>
+ </target>
+ <target name="startTomcatMac" if="isMac" unless='tuscany.tomcat.alreadystarted'>
+ <antcall target="startTomcatUnix" />
+ </target>
+
+ <target name="tuscany.tomcat.alreadystartedmsg" if="tuscany.tomcat.alreadystarted">
+ <echo level="info" message="Tomcat has been already started! ${tuscany.tomcat.alreadystarted}" />
+ </target>
+ <target name="startTomcat" description="Start up tomcat." depends="tuscany.tomcat.alreadystartedmsg,startTomcatWindows,startTomcatUnix,startTomcatMac" unless='tuscany.tomcat.alreadystarted'>
+ <sleep seconds="10" />
+ <!-- it's going to at least require this -->
+ <waitfor maxwait="15" maxwaitunit="second" checkevery="200">
+ <http url="http://localhost:8080" />
+ </waitfor>
+
+ </target>
+
+ <target name="clean" description='Clean out all built artifacts'>
+ <delete dir="${tuscany.acceptance.tc.dir}" />
+ </target>
+
+ <target name='setup.TC.antscripts' depends='tuscany.tomcat.unzipWindows,tuscany.tomcat.unzipUnix,tuscany.tomcat.unzipMac'>
+ <!-- Configure the custom Ant tasks for the Manager application -->
+ <taskdef resource="org/apache/catalina/ant/catalina.tasks">
+ <classpath>
+ <fileset dir="${tuscany.acceptance.tc.dir}/server/lib">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${tuscany.acceptance.tc.dir}/common/lib">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${tuscany.acceptance.tc.dir}/bin">
+ <include name="*.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+
+ </target>
+
+</project>
+
+
diff --git a/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/context.xsl b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/context.xsl
new file mode 100644
index 0000000000..3224d15dae
--- /dev/null
+++ b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/context.xsl
@@ -0,0 +1,96 @@
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" />
+
+ <xsl:param name="classname"/>
+ <!-- xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="node() | @*"/>
+ </xsl:copy>
+ </xsl:template -->
+ <xsl:template
+ match="@* | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </xsl:copy>
+ </xsl:template>
+
+<!--
+ <xsl:template match="Context">
+ <Context>
+ <xsl:apply-templates select="@*" />
+ <Listener className="org.apache.tuscany.tomcat.lifecycle.listener.TomcatWebAppLifecycleListener" />
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </Context>
+ </xsl:template>
+-->
+
+ <!-- xsl:template match="/">
+ <xsl:apply-templates select="node() | @*" />
+ </xsl:template -->
+</xsl:stylesheet>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" />
+
+ <xsl:param name="classname"/>
+ <!-- xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="node() | @*"/>
+ </xsl:copy>
+ </xsl:template -->
+ <xsl:template
+ match="@* | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </xsl:copy>
+ </xsl:template>
+
+<!--
+ <xsl:template match="Context">
+ <Context>
+ <xsl:apply-templates select="@*" />
+ <Listener className="org.apache.tuscany.tomcat.lifecycle.listener.TomcatWebAppLifecycleListener" />
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </Context>
+ </xsl:template>
+-->
+
+ <!-- xsl:template match="/">
+ <xsl:apply-templates select="node() | @*" />
+ </xsl:template -->
+</xsl:stylesheet>
diff --git a/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/datasource.xsl b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/datasource.xsl
new file mode 100644
index 0000000000..ad473e317c
--- /dev/null
+++ b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/datasource.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+<xsl:output method="xml" indent="yes"/>
+
+ <xsl:param name="database_location"/>
+
+<!--Add derby database resource-->
+<xsl:template match="GlobalNamingResources">
+
+ <xsl:copy>
+ <!--Copy existing-->
+ <xsl:apply-templates select="@* | node()" />
+
+ <xsl:comment> Global Datasource for Derby dastest database </xsl:comment>
+ <xsl:text>
+ </xsl:text>
+ <!--Append this-->
+ <Resource name="jdbc/dastest"
+ type="javax.sql.DataSource" auth="Container"
+ description="Derby database for DAS Company sample"
+ maxActive="100" maxIdle="30" maxWait="10000"
+ username="" password=""
+ driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ url="{$database_location}"/>
+
+ </xsl:copy>
+
+</xsl:template>
+
+<!--Copy everything!-->
+<xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()" />
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/pom.xml b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/pom.xml
new file mode 100644
index 0000000000..bbb8acc81d
--- /dev/null
+++ b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/pom.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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>
+ <parent>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution</artifactId>
+ <version>incubating-M1</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>tuscany-distribution-tomcat-overlay</artifactId>
+ <packaging>pom</packaging>
+ <name>Tuscany Distribution Project - Tomcat Overlay</name>
+ <version>incubating-M1</version>
+
+ <!--
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution-tuscany-samples</artifactId>
+ <version>${pom.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution-tuscany-core-overlay</artifactId>
+ <version>${pom.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution-tuscany-tools-overlay</artifactId>
+ <version>${pom.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution-axis2-overlay</artifactId>
+ <version>${pom.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-distribution-celtix-overlay</artifactId>
+ <version>${pom.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ -->
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>create-tomcat</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <ant inheritRefs="true"
+ antfile="configureTomcat.xml" dir="${basedir}"
+ target="prepareTomcat">
+ <property name="target.dir"
+ value="${basedir}/../target/tuscany-dist" />
+ <property name="user.home" value="${user.home}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>clean-tomcat</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <ant inheritRefs="true"
+ antfile="configureTomcat.xml" dir="${basedir}"
+ target="clean">
+ <property name="target.dir"
+ value="${basedir}/../target/tuscany-dist" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/server.xsl b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/server.xsl
new file mode 100644
index 0000000000..7f3deb8107
--- /dev/null
+++ b/sca-java-1.x/branches/java-post-M1/distribution/tomcat-overlay/server.xsl
@@ -0,0 +1,49 @@
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" />
+
+ <xsl:param name="classname"/>
+ <!-- xsl:template match="node() | @*">
+ <xsl:copy>
+ <xsl:apply-templates select="node() | @*"/>
+ </xsl:copy>
+ </xsl:template -->
+ <xsl:template
+ match="@* | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="Host">
+ <Host>
+ <xsl:attribute name="className">
+ <xsl:text>org.apache.tuscany.tomcat.TuscanyHost</xsl:text>
+ </xsl:attribute>
+ <xsl:apply-templates select="@*" />
+ <xsl:apply-templates
+ select="@* | * | comment() | processing-instruction() | text()" />
+ </Host>
+ </xsl:template>
+
+ <!-- xsl:template match="/">
+ <xsl:apply-templates select="node() | @*" />
+ </xsl:template -->
+</xsl:stylesheet>
+