summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/launchers/fullapp
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/fullapp
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/fullapp')
-rw-r--r--sandbox/travelsample/launchers/fullapp/pom.xml11
-rw-r--r--sandbox/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java48
2 files changed, 35 insertions, 24 deletions
diff --git a/sandbox/travelsample/launchers/fullapp/pom.xml b/sandbox/travelsample/launchers/fullapp/pom.xml
index 28236ac687..2584718d15 100644
--- a/sandbox/travelsample/launchers/fullapp/pom.xml
+++ b/sandbox/travelsample/launchers/fullapp/pom.xml
@@ -24,12 +24,19 @@
<artifactId>tuscany-sca</artifactId>
<version>1.6-SNAPSHOT</version>
<!--relativePath>../../pom.xml</relativePath-->
- </parent><version>1.0-SNAPSHOT</version>
+ </parent>
+ <version>1.0-SNAPSHOT</version>
<artifactId>scatours-launcher-fullapp</artifactId>
<name>Apache Tuscany SCA Tours Full Application 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-assembly</artifactId>
diff --git a/sandbox/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java b/sandbox/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java
index 426aeb60ff..e9496eef8e 100644
--- a/sandbox/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java
+++ b/sandbox/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java
@@ -19,35 +19,38 @@
package scatours;
+import static scatours.launcher.LauncherUtil.locate;
+
import java.io.IOException;
-import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
public class FullAppLauncher {
+
public static void main(String[] args) throws Exception {
- SCANode node = SCANodeFactory.newInstance().createSCANode(null,
- new SCAContribution("common", "../../contributions/common/target/classes"),
- new SCAContribution("currency", "../../contributions/currency/target/classes"),
- new SCAContribution("hotel", "../../contributions/hotel/target/classes"),
- new SCAContribution("flight", "../../contributions/flight/target/classes"),
- new SCAContribution("car", "../../contributions/car/target/classes"),
- new SCAContribution("trip", "../../contributions/trip/target/classes"),
- new SCAContribution("tripbooking", "../../contributions/tripbooking/target/classes"),
- new SCAContribution("travelcatalog", "../../contributions/travelcatalog/target/classes"),
- new SCAContribution("payment", "../../contributions/payment-java/target/classes"),
- //new SCAContribution("payment", "../../contributions/payment-spring/target/classes"),
- new SCAContribution("creditcard", "../../contributions/creditcard-payment-jaxb/target/classes"),
- new SCAContribution("shoppingcart", "../../contributions/shoppingcart/target/classes"),
- new SCAContribution("scatours", "../../contributions/scatours/target/classes"),
- new SCAContribution("fullapp-ui", "../../contributions/fullapp-ui/target/classes"),
- new SCAContribution("fullapp-frontend", "../../contributions/fullapp-frontend/target/classes"),
- new SCAContribution("fullapp-currency", "../../contributions/fullapp-currency/target/classes"),
- new SCAContribution("fullapp-packagedtrip", "../../contributions/fullapp-packagedtrip/target/classes"),
- new SCAContribution("fullapp-bespoketrip", "../../contributions/fullapp-bespoketrip/target/classes"),
- new SCAContribution("fullapp-shoppingcart", "../../contributions/fullapp-shoppingcart/target/classes"));
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode(null,
+ locate("common"),
+ locate("currency"),
+ locate("hotel"),
+ locate("flight"),
+ locate("car"),
+ locate("trip"),
+ locate("tripbooking"),
+ locate("travelcatalog"),
+ locate("payment"),
+ //locate("payment"),
+ locate("creditcard"),
+ locate("shoppingcart"),
+ locate("scatours"),
+ locate("fullapp-ui"),
+ locate("fullapp-frontend"),
+ locate("fullapp-currency"),
+ locate("fullapp-packagedtrip"),
+ locate("fullapp-bespoketrip"),
+ locate("fullapp-shoppingcart"));
node.start();
@@ -56,7 +59,8 @@ public class FullAppLauncher {
try {
System.in.read();
- } catch (IOException e) {}
+ } catch (IOException e) {
+ }
node.stop();
}