diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-18 07:46:51 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-18 07:46:51 +0000 |
commit | 2fd232ad1680d2164bfb445b87299742f8af347d (patch) | |
tree | 87a022465a11c7500676a168df4d0f3558c2a5bf /sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java | |
parent | 7a1fb15ee8302de48aa989085d2211593ba22406 (diff) |
Change setting a contributions dependencies explicitly from using the domain.properties file to use a <contributionName>.dependencies file to be more consistent with how the other files are used
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1137135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java index c4bf0d4b26..ad466c19bd 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java @@ -19,6 +19,7 @@ package org.apache.tuscany.sca; +import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; @@ -212,9 +213,16 @@ public class TuscanyRuntime { } List<String> dependencyURIs = new ArrayList<String>(); - String dependencyURIprop = domainProps.getProperty("dependencies." + fn); - if (dependencyURIprop != null && dependencyURIprop.length() > 0) { - dependencyURIs = Arrays.asList(dependencyURIprop.split(",")); + File dependencyFile = new File(directory, fn + ".dependencies"); + if (dependencyFile.exists()) { + BufferedReader br = new BufferedReader(new FileReader(dependencyFile)); + String s; + while ((s = br.readLine()) != null) { + if (!s.startsWith("#") && s.trim().length() > 0) { + dependencyURIs.addAll(Arrays.asList(s.trim().split("[ ,]+"))); + } + } + br.close(); } String curi = node.installContribution(null, f.getPath(), metaData, dependencyURIs); |