summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/node-launcher/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/modules/node-launcher/src/main/java')
-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