summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/itest/samples/build.xml2
-rw-r--r--java/sca/samples/binding-ws-calculator/build.xml6
-rw-r--r--java/sca/samples/implementation-java-calculator/build.xml51
-rw-r--r--java/sca/samples/implementation-java-calculator/pom.xml35
4 files changed, 45 insertions, 49 deletions
diff --git a/java/sca/itest/samples/build.xml b/java/sca/itest/samples/build.xml
index 9650b5e56f..a76b44c659 100644
--- a/java/sca/itest/samples/build.xml
+++ b/java/sca/itest/samples/build.xml
@@ -23,7 +23,7 @@
compile and run each sample as though the user were running
samples from the binary distribution. Here we use ant targets
in the first instance but for some tests we may want to run
- jars directly and fire up webapp containers and deploy wars. In other cases
+ jars directly or fire up webapp containers and deploy wars. In other cases
we may need to run two samples together to provide reference and
service sides of the sample.
-->
diff --git a/java/sca/samples/binding-ws-calculator/build.xml b/java/sca/samples/binding-ws-calculator/build.xml
index 956dee05af..55544a5af7 100644
--- a/java/sca/samples/binding-ws-calculator/build.xml
+++ b/java/sca/samples/binding-ws-calculator/build.xml
@@ -33,7 +33,8 @@
destdir="target/classes"
debug="on"
source="1.5"
- target="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"/>
@@ -54,7 +55,8 @@
<target name="run" depends="compile">
<java classname="org.apache.tuscany.sca.launcher.LauncherMain"
fork="true"
- inputstring="q">
+ 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/tuscany-sca-2.0-SNAPSHOT/bin/launcher.jar"/>
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>