summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/launchers/policy
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 19:32:26 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 19:32:26 +0000
commit18d8aa3401326d927bbb0665e25dd0f2cdce92fd (patch)
tree0ae9e8d37b818600d4f7f3dcdf6a736f2060033d /sandbox/travelsample/launchers/policy
parentc258d9427a37bbd1f152483267920514ebb18e0a (diff)
Introduce a LauncherUtil to locate contributions by name
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@833142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/launchers/policy')
-rw-r--r--sandbox/travelsample/launchers/policy/pom.xml7
-rw-r--r--sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java9
2 files changed, 12 insertions, 4 deletions
diff --git a/sandbox/travelsample/launchers/policy/pom.xml b/sandbox/travelsample/launchers/policy/pom.xml
index ed33c0662b..02fe4bfdf4 100644
--- a/sandbox/travelsample/launchers/policy/pom.xml
+++ b/sandbox/travelsample/launchers/policy/pom.xml
@@ -29,6 +29,13 @@
<name>Apache Tuscany SCA Tours Policy Launcher</name>
<dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours-launcher-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-node-api</artifactId>
diff --git a/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java b/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java
index c55c8d4c13..838b9d93e5 100644
--- a/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java
+++ b/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java
@@ -19,8 +19,9 @@
package scatours;
+import static scatours.launcher.LauncherUtil.locate;
+
import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
@@ -28,13 +29,13 @@ public class PolicyLauncher {
public static void main(String[] args) throws Exception {
SCANode node1 = SCANodeFactory.newInstance().createSCANode(null,
- new SCAContribution("client", "../../contributions/policy-client/target/classes"),
- new SCAContribution("payment", "../../contributions/payment-java-policy/target/classes"));
+ locate("client"),
+ locate("payment"));
node1.start();
SCANode node2 = SCANodeFactory.newInstance().createSCANode(null,
- new SCAContribution("creditcard", "../../contributions/creditcard-payment-jaxb-policy/target/classes"));
+ locate("creditcard"));
node2.start();