You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/01/04 12:19:04 UTC

svn commit: r895599 - in /tuscany/sandbox/travelsample: ./ clients/ clients/currency-converter-corba/ clients/currency-converter-jms/ clients/currency-converter-rmi/ clients/currency-converter-ws-jaxws/ clients/currency-converter-ws-jaxws/src/main/java...

Author: nash
Date: Mon Jan  4 11:19:03 2010
New Revision: 895599

URL: http://svn.apache.org/viewvc?rev=895599&view=rev
Log:
Add/fix ant scripts for non-SCA clients and add additional targets described in the README scenarios

Added:
    tuscany/sandbox/travelsample/clients/build.xml
Modified:
    tuscany/sandbox/travelsample/antdefs.xml
    tuscany/sandbox/travelsample/build.xml
    tuscany/sandbox/travelsample/clients/currency-converter-corba/build.xml
    tuscany/sandbox/travelsample/clients/currency-converter-jms/build.xml
    tuscany/sandbox/travelsample/clients/currency-converter-rmi/build.xml
    tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml
    tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml
    tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java
    tuscany/sandbox/travelsample/launchers/fullapp-nodes/build.xml
    tuscany/sandbox/travelsample/launchers/introducing-client/build.xml
    tuscany/sandbox/travelsample/launchers/notification-ws/build.xml
    tuscany/sandbox/travelsample/services/smsgateway-corba/build.xml

Modified: tuscany/sandbox/travelsample/antdefs.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/antdefs.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/antdefs.xml (original)
+++ tuscany/sandbox/travelsample/antdefs.xml Mon Jan  4 11:19:03 2010
@@ -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>
 

Modified: tuscany/sandbox/travelsample/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/build.xml (original)
+++ tuscany/sandbox/travelsample/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Added: tuscany/sandbox/travelsample/clients/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/build.xml?rev=895599&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/clients/build.xml (added)
+++ tuscany/sandbox/travelsample/clients/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-corba/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-corba/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-corba/build.xml (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-corba/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-jms/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-jms/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-jms/build.xml (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-jms/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-rmi/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-rmi/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-rmi/build.xml (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-rmi/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/pom.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java (original)
+++ tuscany/sandbox/travelsample/clients/currency-converter-ws-jaxws/src/main/java/scatours/CurrencyConverterWSClient.java Mon Jan  4 11:19:03 2010
@@ -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 {
 

Modified: tuscany/sandbox/travelsample/launchers/fullapp-nodes/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/fullapp-nodes/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/launchers/fullapp-nodes/build.xml (original)
+++ tuscany/sandbox/travelsample/launchers/fullapp-nodes/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/launchers/introducing-client/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/introducing-client/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/launchers/introducing-client/build.xml (original)
+++ tuscany/sandbox/travelsample/launchers/introducing-client/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/launchers/notification-ws/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/launchers/notification-ws/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/launchers/notification-ws/build.xml (original)
+++ tuscany/sandbox/travelsample/launchers/notification-ws/build.xml Mon Jan  4 11:19:03 2010
@@ -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>

Modified: tuscany/sandbox/travelsample/services/smsgateway-corba/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/services/smsgateway-corba/build.xml?rev=895599&r1=895598&r2=895599&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/services/smsgateway-corba/build.xml (original)
+++ tuscany/sandbox/travelsample/services/smsgateway-corba/build.xml Mon Jan  4 11:19:03 2010
@@ -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>