summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/deployment/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 09:54:21 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 09:54:21 +0000
commit89d202da6bac342bfabe4281ff873ccbe985a242 (patch)
tree674b635f9cc9e780db1253a41decda44c111843c /sca-java-2.x/trunk/modules/deployment/src
parent957afd4a830855f0a72db4daef95cce46522104c (diff)
Update deployer to use a separate list of contributions to look at when looking for exports
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/deployment/src')
-rw-r--r--sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/Deployer.java2
-rw-r--r--sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java5
-rw-r--r--sca-java-2.x/trunk/modules/deployment/src/test/java/org/apache/tuscany/sca/deployment/impl/DeployerImplTestCase.java2
3 files changed, 5 insertions, 4 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 6d62446ccb..0b75ade042 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
@@ -78,7 +78,7 @@ public interface Deployer extends LifeCycleListener {
* @throws ContributionResolveException
* @throws CompositeBuilderException
*/
- Composite build(List<Contribution> contributions, Map<QName, List<String>> bindingBaseURIs, Monitor monitor)
+ Composite build(List<Contribution> contributions, List<Contribution> allContributions, Map<QName, List<String>> bindingBaseURIs, Monitor monitor)
throws ContributionResolveException, CompositeBuilderException;
/**
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 f6166578d0..d8dd13f5be 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
@@ -444,7 +444,7 @@ public class DeployerImpl implements Deployer {
contribution.getDeployables().add(composite);
}
- public Composite build(List<Contribution> contributions, Map<QName, List<String>> bindingMap, Monitor monitor)
+ public Composite build(List<Contribution> contributions, List<Contribution> allContributions, Map<QName, List<String>> bindingMap, Monitor monitor)
throws ContributionResolveException, CompositeBuilderException {
init();
List<Contribution> contributionList = new ArrayList<Contribution>(contributions);
@@ -504,8 +504,9 @@ public class DeployerImpl implements Deployer {
// Build the contribution dependencies
Set<Contribution> resolved = new HashSet<Contribution>();
+
for (Contribution contribution : contributionList) {
- buildDependencies(contribution, contributionList, monitor);
+ buildDependencies(contribution, allContributions, monitor);
// Resolve contributions
for (Contribution dependency : contribution.getDependencies()) {
diff --git a/sca-java-2.x/trunk/modules/deployment/src/test/java/org/apache/tuscany/sca/deployment/impl/DeployerImplTestCase.java b/sca-java-2.x/trunk/modules/deployment/src/test/java/org/apache/tuscany/sca/deployment/impl/DeployerImplTestCase.java
index cc2bf92dcf..e5c0a499a8 100644
--- a/sca-java-2.x/trunk/modules/deployment/src/test/java/org/apache/tuscany/sca/deployment/impl/DeployerImplTestCase.java
+++ b/sca-java-2.x/trunk/modules/deployment/src/test/java/org/apache/tuscany/sca/deployment/impl/DeployerImplTestCase.java
@@ -79,7 +79,7 @@ public class DeployerImplTestCase {
public void testBuild() throws Exception {
Monitor monitor = deployer.createMonitor();
Contribution contribution = deployer.loadContribution(contributionURL.toURI(), contributionURL, monitor);
- Composite composite = deployer.build(Arrays.asList(contribution), null, monitor);
+ Composite composite = deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
assertTrue(composite != null);
}