tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1303355 - /tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
Date Wed, 21 Mar 2012 10:43:14 GMT
Author: antelder
Date: Wed Mar 21 10:43:13 2012
New Revision: 1303355

URL: http://svn.apache.org/viewvc?rev=1303355&view=rev
Log:
Fix Node validateContribution to not cause duplicate definition problems by removing definitions
aggregation from the resolve method

Modified:
    tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java?rev=1303355&r1=1303354&r2=1303355&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
Wed Mar 21 10:43:13 2012
@@ -629,22 +629,24 @@ public class DeployerImpl implements Dep
         for (Contribution contribution : contributionList) {
             monitor.pushContext("Contribution: " + contribution.getURI());
             try {
-                // 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();
-                        }                            
-                    }
-                }
+// 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();
+//                        }                            
+//                    }
+//                }
 
                 // create a default import and wire it up to the system contribution
                 // model resolver. This is the trick that makes the resolution processing



Mime
View raw message