summaryrefslogtreecommitdiffstats
path: root/java/sca/samples
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-01-30 09:36:40 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-01-30 09:36:40 +0000
commitc1e27601a856fa5d8d7a518301165fe22361f4f9 (patch)
tree36ec6a53a938f7b32c2d04e58883e27fe2c7e052 /java/sca/samples
parentad970009dafba0110369cd1016c7d3c1f8a6a469 (diff)
Update the calculator-rmi sample Ant build scripts so that they work and use the simple way to build the sample jar. The calculator-rmi-service build creates an SCA contribution, the calculator-rmi-reference creates an 'unmanaged' jar which use the Node APIs to start a runtime, the only difference in the build.xml is the additional pathelement for the tuscany-node-api jar for the unmanaged one
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@739220 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/samples')
-rw-r--r--java/sca/samples/calculator-rmi-reference/build.xml88
-rw-r--r--java/sca/samples/calculator-rmi-service/build.xml86
2 files changed, 65 insertions, 109 deletions
diff --git a/java/sca/samples/calculator-rmi-reference/build.xml b/java/sca/samples/calculator-rmi-reference/build.xml
index ca75625b42..66aa53a5f8 100644
--- a/java/sca/samples/calculator-rmi-reference/build.xml
+++ b/java/sca/samples/calculator-rmi-reference/build.xml
@@ -16,58 +16,36 @@
* specific language governing permissions and limitations
* under the License.
-->
-<project name="calculator-rmi-reference" default="compile">
- <property name="test.class" value="calculator.CalculatorClient" />
- <property name="test.jar" value="sample-calculator-rmi-reference.jar" />
- <property name="manifest.jar" value="../../lib/tuscany-sca-manifest.jar" />
-
- <target name="init">
- <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">
- <classpath>
- <pathelement location="${manifest.jar}"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="${manifest.jar}"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="${manifest.jar}"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
+
+<project name="calculator" default="compile">
+
+ <property name="jar.name" value="sample-calculator-rmi-reference.jar" />
+ <property name="main.class" value="calculator.CalculatorClient" />
+
+ <target name="compile" depends="init">
+ <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5">
+ <classpath>
+ <pathelement location="../../modules/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
+ <pathelement location="../../modules/tuscany-node-api-2.0-SNAPSHOT.jar"/>
+ </classpath>
+ </javac>
+ <copy todir="target/classes">
+ <fileset dir="src/main/resources"/>
+ </copy>
+ <jar destfile="target/${jar.name}" basedir="target/classes">
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="init">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="target"/>
+ </delete>
+ <mkdir dir="target/classes"/>
+ </target>
+
+</project>
+
+
diff --git a/java/sca/samples/calculator-rmi-service/build.xml b/java/sca/samples/calculator-rmi-service/build.xml
index f98f35e4b0..4abba9f5a6 100644
--- a/java/sca/samples/calculator-rmi-service/build.xml
+++ b/java/sca/samples/calculator-rmi-service/build.xml
@@ -16,57 +16,35 @@
* specific language governing permissions and limitations
* under the License.
-->
-<project name="calculator-rmi-service-server" default="compile">
- <property name="test.class" value="calculator.CalculatorServer" />
- <property name="test.jar" value="sample-calculator-rmi-service.jar" />
-
- <target name="init">
- <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">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
+
+<project name="calculator" default="compile">
+
+ <property name="jar.name" value="sample-calculator-rmi-service.jar" />
+ <property name="main.class" value="calculator.CalculatorClient" />
+
+ <target name="compile" depends="init">
+ <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5">
+ <classpath>
+ <pathelement location="../../modules/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
+ </classpath>
+ </javac>
+ <copy todir="target/classes">
+ <fileset dir="src/main/resources"/>
+ </copy>
+ <jar destfile="target/${jar.name}" basedir="target/classes">
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="init">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="target"/>
+ </delete>
+ <mkdir dir="target/classes"/>
+ </target>
+
+</project>
+
+