summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/itest/samples/build.xml14
-rw-r--r--java/sca/samples/calculator-rmi-reference/build.xml36
-rw-r--r--java/sca/samples/calculator-rmi-service/build.xml58
3 files changed, 90 insertions, 18 deletions
diff --git a/java/sca/itest/samples/build.xml b/java/sca/itest/samples/build.xml
index a76b44c659..06b60f28c2 100644
--- a/java/sca/itest/samples/build.xml
+++ b/java/sca/itest/samples/build.xml
@@ -32,7 +32,19 @@
dir="../../samples/implementation-java-calculator"/>
<ant antfile="../../samples/binding-ws-calculator/build.xml"
- dir="../../samples/binding-ws-calculator"/>
+ dir="../../samples/binding-ws-calculator"/>
+
+ <!--parallel>
+ <ant antfile="../../samples/calculator-rmi-service/build.xml"
+ dir="../../samples/calculator-rmi-service"/>
+ <sequential>
+ <sleep seconds="2"/>
+ <ant antfile="../../samples/calculator-rmi-reference/build.xml"
+ dir="../../samples/calculator-rmi-reference"/>
+
+ </sequential>
+ </parallel-->
+
</target>
</project>
diff --git a/java/sca/samples/calculator-rmi-reference/build.xml b/java/sca/samples/calculator-rmi-reference/build.xml
index ceaf424e02..b570700be3 100644
--- a/java/sca/samples/calculator-rmi-reference/build.xml
+++ b/java/sca/samples/calculator-rmi-reference/build.xml
@@ -17,13 +17,25 @@
* under the License.
-->
-<project name="calculator" default="compile">
+<project name="binding-rmi-calculator-reference" default="run">
<property name="jar.name" value="sample-calculator-rmi-reference.jar" />
<property name="main.class" value="calculator.CalculatorClient" />
+ <target name="init">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="target"/>
+ </delete>
+ <mkdir dir="target/classes"/>
+ </target>
+
<target name="compile" depends="init">
- <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5">
+ <javac srcdir="src/main/java"
+ destdir="target/classes"
+ debug="on"
+ source="1.5"
+ target="1.5"
+ failonerror="true">
<classpath>
<pathelement location="../../modules/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
<pathelement location="../../modules/tuscany-node-api-2.0-SNAPSHOT.jar"/>
@@ -41,12 +53,20 @@
</jar>
</target>
- <target name="init">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- <mkdir dir="target/classes"/>
- </target>
+ <target name="run" depends="compile">
+ <java classname="org.apache.tuscany.sca.launcher.LauncherMain"
+ fork="true"
+ inputstring="\n"
+ failonerror="true">
+ <jvmarg value="-Djava.util.logging.config.file=${sample.root}/../../logging.properties"/>
+ <classpath>
+ <pathelement location="../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT/tuscany-sca-2.0-SNAPSHOT/bin/launcher.jar"/>
+ <pathelement location="../../bin/launcher.jar"/>
+ </classpath>
+ <arg value="unmanaged"/>
+ <arg value="target/${jar.name}"/>
+ </java>
+ </target>
</project>
diff --git a/java/sca/samples/calculator-rmi-service/build.xml b/java/sca/samples/calculator-rmi-service/build.xml
index 4abba9f5a6..870ac9f68f 100644
--- a/java/sca/samples/calculator-rmi-service/build.xml
+++ b/java/sca/samples/calculator-rmi-service/build.xml
@@ -17,15 +17,30 @@
* under the License.
-->
-<project name="calculator" default="compile">
+<project name="binding-rmi-calculator-service" default="run">
<property name="jar.name" value="sample-calculator-rmi-service.jar" />
<property name="main.class" value="calculator.CalculatorClient" />
+ <target name="init">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="target"/>
+ </delete>
+ <mkdir dir="target/classes"/>
+ </target>
+
<target name="compile" depends="init">
- <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5">
+ <javac srcdir="src/main/java"
+ destdir="target/classes"
+ debug="on"
+ source="1.5"
+ target="1.5"
+ failonerror="true">
<classpath>
<pathelement location="../../modules/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../modules/tuscany-node-api-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../modules/sca-api/target/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../modules/node-api/target/tuscany-node-api-2.0-SNAPSHOT.jar"/>
</classpath>
</javac>
<copy todir="target/classes">
@@ -37,13 +52,38 @@
</manifest>
</jar>
</target>
-
- <target name="init">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- <mkdir dir="target/classes"/>
- </target>
+
+ <!--target name="run" depends="compile">
+ <java classname="org.apache.tuscany.sca.launcher.LauncherMain"
+ fork="true"
+ inputstring="\n"
+ failonerror="true">
+ <jvmarg value="-Djava.util.logging.config.file=${sample.root}/../../logging.properties"/>
+ <classpath>
+ <pathelement location="../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT/tuscany-sca-2.0-SNAPSHOT/bin/launcher.jar"/>
+ <pathelement location="../../bin/launcher.jar"/>
+ </classpath>
+ <arg value="target/${jar.name}"/>
+ </java>
+ </target-->
+
+ <target name="run" depends="compile">
+ <java classname="org.apache.tuscany.sca.node.launcher.NodeLauncher"
+ fork="true"
+ timeout="6000"
+ failonerror="true">
+ <jvmarg value="-Djava.util.logging.config.file=${sample.root}/../../logging.properties"/>
+ <classpath>
+ <pathelement location="../../modules/tuscany-node-launcher-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../modules/commons-cli-1.1/commons-cli-1.1.jar"/>
+ <pathelement location="../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT/tuscany-sca-2.0-SNAPSHOT/modules/tuscany-node-launcher-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT/tuscany-sca-2.0-SNAPSHOT/modules/commons-cli-1.1/commons-cli-1.1.jar"/>
+ </classpath>
+ <arg value="target/${jar.name}"/>
+ <arg value="-t"/>
+ <arg value="5000"/>
+ </java>
+ </target>
</project>