summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 17:01:29 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 17:01:29 +0000
commitbd0decac659e7675f388d79fcdf0e2884ab7a96d (patch)
tree89b2288ec1cb0e2e990075f679885ea17cf52956 /branches/sca-java-1.x/modules
parent2589907eeee152f9f9a3281caf799463b7d2828d (diff)
Improve the node launcher so that it can take more than one contributions and not specify composite, for example, - c1.jar c2.jar
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@829862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules')
-rw-r--r--branches/sca-java-1.x/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/branches/sca-java-1.x/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java b/branches/sca-java-1.x/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
index be9bdb15c4..74d47ceb55 100644
--- a/branches/sca-java-1.x/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
+++ b/branches/sca-java-1.x/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
@@ -125,13 +125,21 @@ public class NodeLauncher {
logger.info("SCA Node configuration: " + configurationURI);
node = launcher.createNodeFromURL(configurationURI);
} else {
-
+
// Create a node from a composite URI and a contribution location
String compositeURI = args[0];
- String contributionLocation = args[1];
- logger.info("SCA composite: " + compositeURI);
- logger.info("SCA contribution: " + contributionLocation);
- node = launcher.createNode(compositeURI, new Contribution("default", contributionLocation));
+ if ("-".equals(compositeURI)) {
+ compositeURI = null;
+ } else {
+ logger.info("SCA composite: " + compositeURI);
+ }
+ Contribution contributions[] = new Contribution[args.length - 1];
+ for (int i = 1; i < args.length; i++) {
+ String contributionLocation = args[i];
+ logger.info("SCA contribution: " + contributionLocation);
+ contributions[i - 1] = new Contribution("contribution" + (i - 1), contributionLocation);
+ }
+ node = launcher.createNode(compositeURI, contributions);
}
// Start the node