summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/tutorials
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-19 21:01:38 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-19 21:01:38 +0000
commit30793d7b55e1d3d14b0a94d19a79d5807ad1d363 (patch)
tree3047389a9c1461751d3bf631091ba145a24a3d87 /sca-java-1.x/trunk/tutorials
parentd89f7793d634a1e786ede094c3609e3856f22c9a (diff)
Merge revision r944729 from release branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@946393 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/tutorials')
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/binaries/build.xml139
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/build.xml3
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/release/README22
3 files changed, 153 insertions, 11 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/binaries/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/binaries/build.xml
new file mode 100644
index 0000000000..12c7c76db8
--- /dev/null
+++ b/sca-java-1.x/trunk/tutorials/travelsample/binaries/build.xml
@@ -0,0 +1,139 @@
+<!--
+ * 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.
+-->
+
+<project name="scatours-binaries" default="compile">
+ <property environment="env"/>
+ <fail unless="env.TUSCANY_HOME">
+ Error: Please set the TUSCANY_HOME environment variable.
+ </fail>
+
+ <target name="check-lib-dir">
+ <!-- check whether there is a lib directory (it only exists when building the distribution) -->
+ <condition property="lib-dir">
+ <available file="../../lib" type="dir"/>
+ </condition>
+ </target>
+
+ <target name="no-lib-dir" unless="lib-dir">
+ <echo>The ant build for "binaries" only produces output when building from the distribution.</echo>
+ </target>
+
+ <target name="compile" depends="check-lib-dir, no-lib-dir" if="lib-dir">
+
+ <!-- copy jars and build.xml to target/clients -->
+ <mkdir dir="target/clients"/>
+ <copy todir="target/clients" flatten="true">
+ <fileset dir="../clients">
+ <include name="**/scatours-client-*.jar"/>
+ </fileset>
+ </copy>
+ <copy file="src/main/resources/build-clients.xml" tofile="target/clients/build.xml"/>
+
+ <!-- copy jars and files to target/contributions -->
+ <mkdir dir="target/contributions"/>
+ <copy todir="target/contributions" flatten="true">
+ <fileset dir="../contributions">
+ <include name="**/target/scatours-contribution-*.jar"/>
+ <exclude name="**/target/scatours-contribution-payment-bpel-process.jar"/>
+ </fileset>
+ </copy>
+ <mkdir dir="target/contributions/scatours-contribution-payment-bpel-process"/>
+ <unzip dest="target/contributions/scatours-contribution-payment-bpel-process">
+ <fileset dir="../contributions">
+ <include name="**/target/scatours-contribution-payment-bpel-process.jar"/>
+ </fileset>
+ </unzip>
+
+ <!-- copy files to target/domainconfig -->
+ <mkdir dir="target/domainconfig"/>
+ <unzip dest="target/domainconfig">
+ <fileset dir="../domainconfig">
+ <include name="**/scatours-domainconfig-*.jar"/>
+ </fileset>
+ <patternset>
+ <exclude name="META-INF"/>
+ <exclude name="META-INF/**/*"/>
+ </patternset>
+ </unzip>
+
+ <!-- copy jars to target/jaxws -->
+ <mkdir dir="target/jaxws"/>
+ <copy todir="target/jaxws">
+ <fileset dir="../../lib/jaxws">
+ <exclude name="jaxws-tools*.jar"/>
+ </fileset>
+ </copy>
+
+ <!-- copy jars and build.xml to target/launchers -->
+ <mkdir dir="target/launchers"/>
+ <copy todir="target/launchers" flatten="true">
+ <fileset dir="../launchers">
+ <include name="**/scatours-launcher-*.jar"/>
+ <exclude name="**/scatours-launcher-jumpstart.jar"/>
+ </fileset>
+ </copy>
+ <copy file="src/main/resources/build-launchers.xml" tofile="target/launchers/build.xml"/>
+
+ <!-- copy files to target/ode -->
+ <mkdir dir="target/ode"/>
+ <unzip dest="target/ode">
+ <fileset dir="${env.TUSCANY_HOME}/lib">
+ <include name="ode-dao-jpa-ojpa-derby*.zip"/>
+ </fileset>
+ </unzip>
+
+ <!-- copy jars to target/openejb -->
+ <mkdir dir="target/openejb"/>
+ <copy todir="target/openejb">
+ <fileset dir="../../lib/openejb"/>
+ </copy>
+
+ <!-- copy jars and build.xml to target/services -->
+ <mkdir dir="target/services"/>
+ <copy todir="target/services" flatten="true">
+ <fileset dir="../services">
+ <include name="**/scatours-service-*.jar"/>
+ </fileset>
+ </copy>
+ <copy file="src/main/resources/build-services.xml" tofile="target/services/build.xml"/>
+
+ <!-- copy jars and build-defs.xml to target/util -->
+ <mkdir dir="target/util"/>
+ <copy todir="target/util" flatten="true">
+ <fileset dir="../util">
+ <include name="**/scatours-util-*.jar"/>
+ </fileset>
+ <fileset file="src/main/resources/build-defs.xml"/>
+ </copy>
+
+ <!-- copy jars to target/webapps -->
+ <mkdir dir="target/webapps"/>
+ <copy todir="target/webapps" flatten="true">
+ <fileset dir="../contributions">
+ <include name="**/scatours-contribution-*.war"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="clean">
+ <delete dir="target" includeemptydirs="true"/>
+ </target>
+
+</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/build.xml
index f74b4cb2a8..e5ef780eef 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/build.xml
+++ b/sca-java-1.x/trunk/tutorials/travelsample/build.xml
@@ -43,7 +43,8 @@
<ant dir="domainconfig" target="${target}"/> <!--needed by launchers-->
<ant dir="services" target="${target}"/> <!--needed by launchers-->
<ant dir="launchers" target="${target}"/> <!--needed by clients-->
- <ant dir="clients" target="${target}"/>
+ <ant dir="clients" target="${target}"/> <!--needed by binaries-->
+ <ant dir="binaries" target="${target}"/>
</target>
</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/release/README b/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/release/README
index ff2ef4e974..d300026991 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/release/README
+++ b/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/release/README
@@ -608,11 +608,12 @@ You can do this as follows:
Running travel sample scenarios from the "binaries" directory
-------------------------------------------------------------
-If the travel sample was built using Maven, a binaries/target directory
-will be created with subdirectories containing all the built jar and war
-files and runtime dependencies for these files. This enables you to see
-how a Tuscany application can be packaged in binary form by an application
-developer for distribution to users of the application.
+If the travel sample was built from the distribution using Ant or Maven,
+a binary package for the travel sample will be created in the binaries/target
+directory and its subdirectories. This binary package contains all the built
+jar and war files and runtime dependencies for these files. By looking at the
+contents of the binaries/target directory tree you can see how to package a
+Yuscany application in binary form for distribution to users of the application.
The following subdirectories of binaries/target contain jar and war files
for the travel sample:
@@ -632,8 +633,8 @@ for the above files:
ode - JPA Derby database needed by the ODE runtime
openejb - OpenEJB 3.1.2 runtime jars needed by the travel sample
-You can run the travel sample scenarios that have launchers by doing
-the following:
+To use the binary package to run the travel sample scenarios packaged with
+launchers, you can do the following:
1. Open a command prompt.
2. Change directory to travelsample/binaries/target/<runtime-dir> where
<runtime-dir> is the directory for the scenario shown in Table 3 below.
@@ -649,7 +650,7 @@ the following:
launcher or launchers for the scenario. The recommended browser is
Firefox as some scenarios don't work with Internet Explorer.
-Table 3. Running scenarios with launchers from the binaries directory
+Table 3. Running scenarios with launchers from the binaries/target directory
-------------------------------------------------------------------------------------------------------------------
| Scenario Directory Commands URLs |
-------------------------------------------------------------------------------------------------------------------
@@ -747,8 +748,9 @@ Table 3. Running scenarios with launchers from the binaries directory
| | launchers | ant run-notification-ws | |
-------------------------------------------------------------------------------------------------------------------
-The scenarios packaged as web applications can be run using .war files
-from the binaries/target/webapps directory as follows:
+Some scenarios are packaged as web applications and don't have launchers.
+You can run these using .war files from the binaries/target/webapps
+directory as follows:
1. Deploy the web application (.war) file to a Web application server
such as Tomcat. The .war file can be found in the directory
travelsample/binaries/target/webapps and has the name listed in