diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-08 08:33:01 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-08 08:33:01 +0000 |
commit | b4c69b01d52185e9d8c2d3fe9681aab6a52c6d2d (patch) | |
tree | 5c738181f38974548ab22bd9ddccb889ace97ef9 /java/sca | |
parent | 4059c569aeec41f10e459ed65dd683cd5e50599c (diff) |
Updating build script to allow user to call ant run
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@742017 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/samples/calculator/build.xml | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/java/sca/samples/calculator/build.xml b/java/sca/samples/calculator/build.xml index 36f733e12d..9d1276444e 100644 --- a/java/sca/samples/calculator/build.xml +++ b/java/sca/samples/calculator/build.xml @@ -19,33 +19,45 @@ <project name="calculator" default="compile"> - <property name="jar.name" value="sample-calculator.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> + <property name="jar.name" value="sample-calculator.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> + + <target name="run" depends="compile"> + <java classname="org.apache.tuscany.sca.launcher.LauncherMain" + fork="true" + failonerror="true"> + <classpath> + <pathelement location="../../bin/launcher.jar"/> + </classpath> + <arg value="unmanaged"/> + <arg value="target/${jar.name}"/> + </java> + </target> + +</project> |