rename binding-ws-calculator to make it clear that it's a contribution (may decide to use subdirectories for this but seeing how we feel about this approach first)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@944245 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8b3c4c894f
commit
1a1823d6d0
21 changed files with 34 additions and 9 deletions
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
|
@ -25,8 +25,8 @@
|
||||||
<version>2.0-SNAPSHOT</version>
|
<version>2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>sample-binding-ws-calculator</artifactId>
|
<artifactId>sample-contribution-binding-ws-calculator</artifactId>
|
||||||
<name>Apache Tuscany SCA Sample Binding WS Calculator</name>
|
<name>Apache Tuscany SCA Sample Binding WS Calculator Contribution</name>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<echo>Please use 'ant run-name-of-sample-contribution-to-run' </echo>
|
<echo>Please use 'ant run-name-of-sample-contribution-to-run' </echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="run-binding-ws-calculator" depends="compile">
|
<target name="run-contribution-binding-ws-calculator" depends="compile">
|
||||||
<java classname="${main.class}"
|
<java classname="${main.class}"
|
||||||
fork="true"
|
fork="true"
|
||||||
failonerror="true">
|
failonerror="true">
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<include name="tuscany-sca-manifest.jar" />
|
<include name="tuscany-sca-manifest.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</classpath>
|
</classpath>
|
||||||
<arg value="binding-ws-calculator"/>
|
<arg value="contribution-binding-ws-calculator"/>
|
||||||
</java>
|
</java>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,12 +41,12 @@ public class SampleJSELauncher {
|
||||||
if (args == null || args.length != 1){
|
if (args == null || args.length != 1){
|
||||||
System.out.println("Please provide the name of the sample contribution to run as a parameter");
|
System.out.println("Please provide the name of the sample contribution to run as a parameter");
|
||||||
System.out.println("Running binding-ws-calculator by default");
|
System.out.println("Running binding-ws-calculator by default");
|
||||||
contribution = "binding-ws-calculator";
|
contribution = "contribution-binding-ws-calculator";
|
||||||
} else {
|
} else {
|
||||||
contribution = args[0];
|
contribution = args[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contribution.equals("binding-ws-calculator")){
|
if (contribution.equals("contribution-binding-ws-calculator")){
|
||||||
launcher.launchBindingWSCalculator();
|
launcher.launchBindingWSCalculator();
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Sample contribution " + contribution + "not found");
|
System.out.println("Sample contribution " + contribution + "not found");
|
||||||
|
|
@ -65,11 +65,13 @@ public class SampleJSELauncher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchBindingWSCalculator(){
|
public void launchBindingWSCalculator(){
|
||||||
Node node = startNode(new Contribution("c1", "../binding-ws-calculator/target/classes"));
|
Node node = startNode(new Contribution("c1", "../contribution-binding-ws-calculator/target/classes"));
|
||||||
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
|
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
|
||||||
|
|
||||||
// TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
|
// TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
|
||||||
if (calculator.add(3, 2) != 5.0){
|
double result = calculator.add(3, 2);
|
||||||
|
System.out.println("3 + 2 = " + result);
|
||||||
|
if (result != 5.0){
|
||||||
throw new SampleLauncherException();
|
throw new SampleLauncherException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
||||||
<activeByDefault>true</activeByDefault>
|
<activeByDefault>true</activeByDefault>
|
||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
<module>binding-ws-calculator</module>
|
|
||||||
<module>calculator</module>
|
<module>calculator</module>
|
||||||
<module>calculator-equinox</module>
|
<module>calculator-equinox</module>
|
||||||
<module>calculator-osgi</module>
|
<module>calculator-osgi</module>
|
||||||
|
|
@ -76,6 +75,30 @@
|
||||||
<module>webapps/helloworld-jsp</module>
|
<module>webapps/helloworld-jsp</module>
|
||||||
<module>webapps/helloworld-stripes</module>
|
<module>webapps/helloworld-stripes</module>
|
||||||
<module>webapps/helloworld-servlet</module>
|
<module>webapps/helloworld-servlet</module>
|
||||||
|
|
||||||
|
<!-- contributions - SCA samples -->
|
||||||
|
|
||||||
|
<module>contribution-binding-ws-calculator</module>
|
||||||
|
|
||||||
|
<!-- contributions - Tuscany samples -->
|
||||||
|
|
||||||
|
<!-- TODO -->
|
||||||
|
|
||||||
|
<!-- contribution launchers -->
|
||||||
|
|
||||||
|
<!-- don't need to process this as it has just a README in it
|
||||||
|
<module>launcher-command-line</module>
|
||||||
|
-->
|
||||||
|
<module>launcher-embedded-jse</module>
|
||||||
|
|
||||||
|
<!-- don't add yet
|
||||||
|
<module>launcher-embedded-osgi</module>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Application samples -->
|
||||||
|
|
||||||
|
<!-- TODO -->
|
||||||
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue