diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-26 21:21:42 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-26 21:21:42 +0000 |
commit | e06c715ae33d61143beb3bbe5886c55743caf8df (patch) | |
tree | bc9de1310a31d1dcfa1ee850ee2519d38981f184 /branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org | |
parent | 58f3dfa30d69a869d7195cbba8b6d52b454b603a (diff) |
Merge the launcher enhancement from 1.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@829977 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org')
-rw-r--r-- | branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java b/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java index be9bdb15c4..74d47ceb55 100644 --- a/branches/sca-java-1.5.2/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java +++ b/branches/sca-java-1.5.2/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 |