summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-01-04 11:19:03 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-01-04 11:19:03 +0000
commit0f35c9aefbfd12cdc8cd61e52aeddca9532564d9 (patch)
tree3fd054c18ff03250d8e1cfcf59541b73df54886e /sandbox/travelsample
parentc4ccb1597654672939b367689a3594305191e496 (diff)
Add/fix ant scripts for non-SCA clients and add additional targets described in the README scenarios
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@895599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample')
-rw-r--r--sandbox/travelsample/antdefs.xml14
-rw-r--r--sandbox/travelsample/build.xml8
-rw-r--r--sandbox/travelsample/clients/build.xml47
-rw-r--r--sandbox/travelsample/clients/currency-converter-corba/build.xml30
-rw-r--r--sandbox/travelsample/clients/currency-converter-jms/build.xml27
-rw-r--r--sandbox/travelsample/clients/currency-converter-rmi/build.xml20
-rw-r--r--sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml36
-rw-r--r--sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml2
-rw-r--r--sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java4
-rw-r--r--sandbox/travelsample/launchers/fullapp-nodes/build.xml6
-rw-r--r--sandbox/travelsample/launchers/introducing-client/build.xml13
-rw-r--r--sandbox/travelsample/launchers/notification-ws/build.xml6
-rw-r--r--sandbox/travelsample/services/smsgateway-corba/build.xml1
13 files changed, 135 insertions, 79 deletions
diff --git a/sandbox/travelsample/antdefs.xml b/sandbox/travelsample/antdefs.xml
index 00d69133ea..9d2f26db2d 100644
--- a/sandbox/travelsample/antdefs.xml
+++ b/sandbox/travelsample/antdefs.xml
@@ -29,8 +29,6 @@
TUSCANY_HOME A directory containing the Tuscany binary distribution.
JUNIT_JAR The location of the JUnit jar file. The JUnit version used
for testing these build files was JUnit 4.5.
- TUSCANY_HOST_CORBA (only needed to run CORBA services) A directory
- containing the Tuscany JSE CORBA host jars.
This file defines the following targets that can be used on the
ant command that invokes the build.xml file:
@@ -82,6 +80,7 @@
"idlj" Generates Java code from a CORBA IDL file (unless the Java
code is already up to date) by running the JDK idlj command.
Requires the following parameters:
+ . <idljopts> the options to be used on this idlj command invocation
. <idlfile> the filename of the IDL file
. <javaclass> the filename of any Java class file that will be
generated by running this target for this IDL file
@@ -185,7 +184,10 @@
<target name="idlj" depends="#idlcheck" unless="#idl-uptodate">
<mkdir dir="target/idlj-source"/>
<exec executable="${java.home}/../bin/idlj">
- <arg line="-fall -td target/idlj-source src/main/resources/${idlfile}"/>
+ <arg value="${idljopts}"/>
+ <arg value="-td"/>
+ <arg value="target/idlj-source"/>
+ <arg value="src/main/resources/${idlfile}"/>
</exec>
<javac destdir="target/classes" debug="on" source="1.5" target="1.5">
<src path="target/idlj-source"/>
@@ -395,6 +397,7 @@
<!-- for external use on the ant command line -->
<target name="compile">
+ <echo message="Compiling project ${ant.project.name}"/>
<mkdir dir="target/classes"/>
<antcall target="#call-wsdljava"/>
<antcall target="#call-idljava"/>
@@ -406,6 +409,7 @@
<!-- for external use on the ant command line -->
<target name="test" depends="#find-testjava, #set-test-classpath, #default-test-classpath" if="#testjava">
+ <echo message="Testing project ${ant.project.name}"/>
<mkdir dir="target/test-classes"/>
<javac destdir="target/test-classes" debug="on" source="1.5" target="1.5">
<src path="src/test/java"/>
@@ -422,13 +426,15 @@
</target>
<!-- for external use on the ant command line -->
- <target name="package" depends="#find-javafiles" if="#javafiles">
+ <target name="package">
+ <echo message="Packaging project ${ant.project.name}"/>
<antcall target="#package-war"/>
<antcall target="#package-jar"/>
</target>
<!-- for external use on the ant command line -->
<target name="clean">
+ <echo message="Cleaning project ${ant.project.name}"/>
<delete dir="target" includeemptydirs="true"/>
</target>
diff --git a/sandbox/travelsample/build.xml b/sandbox/travelsample/build.xml
index 1555d9ad68..b55d96d5e8 100644
--- a/sandbox/travelsample/build.xml
+++ b/sandbox/travelsample/build.xml
@@ -38,12 +38,10 @@
</target>
<target name="allsubdirs">
- <!--
+ <ant dir="contributions" 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="contributions" target="${target}"/>
- <ant dir="launchers" target="${target}"/>
- <ant dir="services" target="${target}"/>
</target>
</project>
diff --git a/sandbox/travelsample/clients/build.xml b/sandbox/travelsample/clients/build.xml
new file mode 100644
index 0000000000..78e305c3cd
--- /dev/null
+++ b/sandbox/travelsample/clients/build.xml
@@ -0,0 +1,47 @@
+<!--
+ * 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-clients" default="compile">
+
+ <target name="compile">
+ <antcall target="allsubdirs">
+ <param name="target" value="compile"/>
+ </antcall>
+ </target>
+
+ <target name="test">
+ <antcall target="allsubdirs">
+ <param name="target" value="test"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="allsubdirs">
+ <param name="target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="allsubdirs">
+ <ant dir="currency-converter-corba" target="${target}"/>
+ <ant dir="currency-converter-jms" target="${target}"/>
+ <ant dir="currency-converter-rmi" target="${target}"/>
+ <ant dir="currency-converter-ws-jaxws" target="${target}"/>
+ </target>
+
+</project>
diff --git a/sandbox/travelsample/clients/currency-converter-corba/build.xml b/sandbox/travelsample/clients/currency-converter-corba/build.xml
index 84fc3bf1d3..17ea72e648 100644
--- a/sandbox/travelsample/clients/currency-converter-corba/build.xml
+++ b/sandbox/travelsample/clients/currency-converter-corba/build.xml
@@ -18,27 +18,25 @@
-->
<project name="scatours-client-currency-converter-corba" default="compile">
- <property environment="env"/>
+ <import file="../../antdefs.xml"/>
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- </javac>
+ <target name="idljava">
+ <antcall target="idlj">
+ <param name="idljopts" value="-fclient"/>
+ <param name="idlfile" value="currency-converter.idl"/>
+ <param name="javaclass" value="com/tuscanyscatours/currencyconverter/CurrencyConverter.class"/>
+ </antcall>
+ </target>
+
+ <!-- Before invoking the "run" target, the CORBA implementation of the
+ currency converter service needs to be started in its own process. -->
+ <target name="run-service">
+ <ant dir="../../launchers/currency-converter-corba" target="run"/>
</target>
<target name="run">
<java classname="scatours.CurrencyConverterCORBAClient" fork="true">
- <classpath>
- <pathelement location="target/classes"/>
- </classpath>
+ <classpath location="target/${ant.project.name}.jar"/>
</java>
</target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
</project>
diff --git a/sandbox/travelsample/clients/currency-converter-jms/build.xml b/sandbox/travelsample/clients/currency-converter-jms/build.xml
index 0014765a4c..41aa9f2337 100644
--- a/sandbox/travelsample/clients/currency-converter-jms/build.xml
+++ b/sandbox/travelsample/clients/currency-converter-jms/build.xml
@@ -18,28 +18,25 @@
-->
<project name="scatours-client-currency-converter-jms" default="compile">
- <property environment="env"/>
+ <import file="../../antdefs.xml"/>
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- </javac>
+ <!-- Before invoking the "run" target, both the JMS broker and the
+ JMS implementation of the currency converter service need to be
+ started, each in its own process. -->
+ <target name="run-broker">
+ <ant dir="../../launchers/currency-converter-jms" target="run-broker"/>
+ </target>
+ <target name="run-service">
+ <ant dir="../../launchers/currency-converter-jms" target="run"/>
</target>
<target name="run">
<java classname="scatours.CurrencyConverterJMSClient" fork="true">
<classpath>
- <pathelement location="target/classes"/>
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
+ <pathelement location="target/${ant.project.name}.jar"/>
+ <!-- The following is used to bring in the ActiveMQ runtime. -->
+ <pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/>
</classpath>
</java>
</target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
</project>
diff --git a/sandbox/travelsample/clients/currency-converter-rmi/build.xml b/sandbox/travelsample/clients/currency-converter-rmi/build.xml
index 0a7a607fda..2d9d3bc9d9 100644
--- a/sandbox/travelsample/clients/currency-converter-rmi/build.xml
+++ b/sandbox/travelsample/clients/currency-converter-rmi/build.xml
@@ -18,27 +18,19 @@
-->
<project name="scatours-client-currency-converter-rmi" default="compile">
- <property environment="env"/>
+ <import file="../../antdefs.xml"/>
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- </javac>
+ <!-- Before invoking the "run" target, the RMI implementation of the
+ currency converter service needs to be started in its own process. -->
+ <target name="run-service">
+ <ant dir="../../launchers/currency-converter-rmi" target="run"/>
</target>
<target name="run">
<java classname="scatours.CurrencyConverterRMIClient" fork="true">
<classpath>
- <pathelement location="target/classes"/>
+ <pathelement location="target/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
</project>
diff --git a/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml b/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml
index 8b866698ff..6d17bbd1a3 100644
--- a/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml
+++ b/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml
@@ -18,35 +18,27 @@
-->
<project name="scatours-client-currency-converter-ws-jaxws" default="compile">
- <property environment="env"/>
+ <import file="../../antdefs.xml"/>
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- <!--
- <classpath>
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
- </classpath>
- -->
- </javac>
+ <target name="wsdljava">
+ <antcall target="wsimport">
+ <param name="wsdlfile" value="wsdl/CurrencyConverter.wsdl"/>
+ <param name="javaclass" value="scatours/currencyconverter/client/CurrencyConverter.class"/>
+ <param name="package" value="scatours.currencyconverter.client"/>
+ </antcall>
+ </target>
+
+ <!-- Before invoking the "run" target, the Web Services implementation of
+ the currency converter service needs to be started in its own process. -->
+ <target name="run-service">
+ <ant dir="../../launchers/currency-converter-ws" target="run"/>
</target>
<target name="run">
<java classname="scatours.CurrencyConverterWSClient" fork="true">
<classpath>
- <pathelement location="target/classes"/>
- <!--
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
- -->
+ <pathelement location="target/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
</project>
diff --git a/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml b/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml
index b79a5477b2..8880c341bd 100644
--- a/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml
+++ b/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml
@@ -79,7 +79,7 @@
</goals>
<configuration>
<wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory>
- <packageName>scatours.curencyconverter.client</packageName>
+ <packageName>scatours.currencyconverter.client</packageName>
</configuration>
</execution>
</executions>
diff --git a/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java b/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java
index ae0bae2a3e..dbaa7c2124 100644
--- a/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java
+++ b/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java
@@ -18,8 +18,8 @@
*/
package scatours;
-import scatours.curencyconverter.client.CurrencyConverter;
-import scatours.curencyconverter.client.CurrencyConverterService;
+import scatours.currencyconverter.client.CurrencyConverter;
+import scatours.currencyconverter.client.CurrencyConverterService;
public class CurrencyConverterWSClient {
diff --git a/sandbox/travelsample/launchers/fullapp-nodes/build.xml b/sandbox/travelsample/launchers/fullapp-nodes/build.xml
index 14a483b564..00fef1d701 100644
--- a/sandbox/travelsample/launchers/fullapp-nodes/build.xml
+++ b/sandbox/travelsample/launchers/fullapp-nodes/build.xml
@@ -20,6 +20,12 @@
<project name="scatours-launcher-fullapp-nodes" default="compile">
<import file="../../antdefs.xml"/>
+ <!-- Before invoking the "run" target, the domain manager needs
+ to be started and running in a different process. -->
+ <target name="run-domain">
+ <ant dir="../fullapp-domain" target="run"/>
+ </target>
+
<target name="run">
<java classname="scatours.FullAppNodesLauncher" fork="true">
<classpath>
diff --git a/sandbox/travelsample/launchers/introducing-client/build.xml b/sandbox/travelsample/launchers/introducing-client/build.xml
index 4cd4a902f8..cfe3a6fd76 100644
--- a/sandbox/travelsample/launchers/introducing-client/build.xml
+++ b/sandbox/travelsample/launchers/introducing-client/build.xml
@@ -20,6 +20,19 @@
<project name="scatours-launcher-introducing-client" default="compile">
<import file="../../antdefs.xml"/>
+ <!-- Before invoking the "run" target, the domain manager and the
+ introducing-trips and introducing-tours nodes need to be started
+ and running in different processes. -->
+ <target name="run-domain">
+ <ant dir="../introducing-domain" target="run"/>
+ </target>
+ <target name="run-trips">
+ <ant dir="../introducing-trips" target="run"/>
+ </target>
+ <target name="run-tours">
+ <ant dir="../introducing-tours" target="run"/>
+ </target>
+
<target name="run">
<java classname="scatours.IntroducingClientLauncher" fork="true">
<classpath>
diff --git a/sandbox/travelsample/launchers/notification-ws/build.xml b/sandbox/travelsample/launchers/notification-ws/build.xml
index dff087b710..2d9660caeb 100644
--- a/sandbox/travelsample/launchers/notification-ws/build.xml
+++ b/sandbox/travelsample/launchers/notification-ws/build.xml
@@ -24,6 +24,12 @@
</path>
<path id="package-path" refid="compile-path"/>
+ <!-- Before invoking the "run" target, the JAX-WS server for the SMS Gateway
+ remote object needs to be started and running in a different process. -->
+ <target name="run-smsgateway">
+ <ant dir="../../services/smsgateway-jaxws" target="run"/>
+ </target>
+
<target name="run">
<java classname="scatours.NotificationWSLauncher" fork="true">
<classpath>
diff --git a/sandbox/travelsample/services/smsgateway-corba/build.xml b/sandbox/travelsample/services/smsgateway-corba/build.xml
index b56445a129..c0bd7e24a4 100644
--- a/sandbox/travelsample/services/smsgateway-corba/build.xml
+++ b/sandbox/travelsample/services/smsgateway-corba/build.xml
@@ -22,6 +22,7 @@
<target name="idljava">
<antcall target="idlj">
+ <param name="idljopts" value="-fall"/>
<param name="idlfile" value="sms-gateway.idl"/>
<param name="javaclass" value="scatours/smsgateway/SMSGatewayPOA.class"/>
</antcall>