summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache')
-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.java11
2 files changed, 7 insertions, 6 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()) {