diff options
Diffstat (limited to '')
3 files changed, 11 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/Deployer.java b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/Deployer.java index f2af30b145..0e6b297b7b 100644 --- a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/Deployer.java +++ b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/Deployer.java @@ -218,7 +218,7 @@ public interface Deployer extends LifeCycleListener { * @throws ContributionResolveException * @throws CompositeBuilderException */ - void resolve(Contribution c, List<Contribution> dependentContributions, Monitor monitor) throws ContributionResolveException, CompositeBuilderException; + void resolve(List<Contribution> contributionList, Contribution systemContribution, Monitor monitor) throws ContributionResolveException, CompositeBuilderException; public Contribution cloneSystemContribution(Monitor monitor); diff --git a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java index ae9a869417..57bd6507d9 100644 --- a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java +++ b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java @@ -610,12 +610,12 @@ public class DeployerImpl implements Deployer { return domainComposite; } - public void resolve(Contribution c, List<Contribution> dependentContributions, Monitor monitor) throws ContributionResolveException, CompositeBuilderException { + public void resolve(List<Contribution> contributionList, Contribution systemContribution, Monitor monitor) throws ContributionResolveException, CompositeBuilderException { init(); - List<Contribution> contributionList = new ArrayList<Contribution>(); - contributionList.add(c); - Contribution systemContribution = cloneSystemContribution(monitor); + if (systemContribution == null) { + systemContribution = cloneSystemContribution(monitor); + } Definitions systemDefinitions = systemContribution.getArtifacts().get(0).getModel(); // Build an aggregated SCA definitions model. Must be done before we try and // resolve any contributions or composites as they may depend on the full @@ -635,6 +635,7 @@ public class DeployerImpl implements Deployer { continue; } Object model = artifact.getModel(); + // FIXME: Should we check the artifact URI is META-INF/definitions.xml? if (model instanceof Definitions) { try { monitor.pushContext("Definitions: " + artifact.getLocation()); @@ -671,7 +672,7 @@ public class DeployerImpl implements Deployer { Set<Contribution> resolved = new HashSet<Contribution>(); for (Contribution contribution : contributionList) { - buildDependencies(contribution, dependentContributions, monitor); + buildDependencies(contribution, contributionList, monitor); // Resolve contributions for (Contribution dependency : contribution.getDependencies()) { diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java index 9ee36c1e38..456c4ef7b6 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java @@ -344,7 +344,10 @@ public class NodeImpl implements Node { Monitor monitor = deployer.createMonitor(); try { - deployer.resolve(contribution, calculateDependentContributions(cd), monitor); + ArrayList<Contribution> cs = new ArrayList<Contribution>(); + cs.add(contribution); + cs.addAll(calculateDependentContributions(cd)); + deployer.resolve(cs, null, monitor); } catch (Exception e) { loadedContributions.remove(cd.getURI()); throw new RuntimeException(e); |