diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-27 12:48:47 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-27 12:48:47 +0000 |
commit | d28e692331d0fa5cc4a8aa010f4c715da07abf7e (patch) | |
tree | 03903ea5f6c6bb1236bcc186956f1bc6db2db469 /sca-java-2.x/trunk/modules/deployment | |
parent | e8ba81006c98f66862c493b193e32f56c79c570b (diff) |
Put back the definitions as it causes some policy regressions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1305824 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/deployment')
-rw-r--r-- | sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java | 34 |
1 files changed, 16 insertions, 18 deletions
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 4631462aab..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 @@ -629,24 +629,22 @@ public class DeployerImpl implements Deployer { for (Contribution contribution : contributionList) { monitor.pushContext("Contribution: " + contribution.getURI()); try { -// For now don't aggregate definitions in resolve as that causes duplicate definitions when build is run -// as there is no way presently to remove aggregated definitions -// // aggregate definitions -// for (Artifact artifact : contribution.getArtifacts()) { -// if (!"META-INF/definitions.xml".equals(artifact.getURI())) { -// 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()); -// DefinitionsUtil.aggregate((Definitions)model, systemDefinitions, monitor); -// } finally { -// monitor.popContext(); -// } -// } -// } + // aggregate definitions + for (Artifact artifact : contribution.getArtifacts()) { + if (!"META-INF/definitions.xml".equals(artifact.getURI())) { + 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()); + DefinitionsUtil.aggregate((Definitions)model, systemDefinitions, monitor); + } finally { + monitor.popContext(); + } + } + } // create a default import and wire it up to the system contribution // model resolver. This is the trick that makes the resolution processing |