diff options
Diffstat (limited to 'java/sca/samples/implementation-java-calculator')
-rw-r--r-- | java/sca/samples/implementation-java-calculator/build.xml | 51 | ||||
-rw-r--r-- | java/sca/samples/implementation-java-calculator/pom.xml | 35 |
2 files changed, 40 insertions, 46 deletions
diff --git a/java/sca/samples/implementation-java-calculator/build.xml b/java/sca/samples/implementation-java-calculator/build.xml index 7edda08a7c..4457877df3 100644 --- a/java/sca/samples/implementation-java-calculator/build.xml +++ b/java/sca/samples/implementation-java-calculator/build.xml @@ -18,17 +18,46 @@ --> <project name="implementation-java-calculator" default="run"> <!-- could dertmine the same name autmatically --> - <import file="../build-common.xml"/> - - <property name="sample.name" value="${ant.project.name}"/> - <property name="sample.root" value="."/> - <property name="sample.jar" value="${sample.root}/target/sample-${sample.name}.jar" /> - <property name="sample.composite" value="Calculator.composite"/> - - <target name="compile" depends="common-jar-compile"/> - - <target name="run" depends="common-run-equinox"/> + + <property name="jar.name" value="implementation-java-calculator" /> + + <target name="init"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target"/> + </delete> + <mkdir dir="target/classes"/> + </target> - <target name="clean" depends="common-clean"/> + <target name="compile" depends="init"> + <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/sca-api/target/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"/> + </target> + + <target name="run" depends="compile"> + <java classname="org.apache.tuscany.sca.launcher.LauncherMain" + fork="true" + inputstring="q" + 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-dir.dir/tuscany-sca-2.0-SNAPSHOT/bin/launcher.jar"/> + <pathelement location="../../bin/launcher.jar"/> + </classpath> + <arg value="target/${jar.name}"/> + </java> + </target> </project> diff --git a/java/sca/samples/implementation-java-calculator/pom.xml b/java/sca/samples/implementation-java-calculator/pom.xml index ccbca5cb57..ca07106d1a 100644 --- a/java/sca/samples/implementation-java-calculator/pom.xml +++ b/java/sca/samples/implementation-java-calculator/pom.xml @@ -59,39 +59,4 @@ </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> -<!--- commenting out just for now as its failing when building from the tuscany/sca root, works from withing the sample folder, not sure why yet - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.1</version> - - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>test-ant-scripts</id> - <phase>package</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build.xml" target="run"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> ---> - </plugins> - </build> </project> |