geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r811320 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core: GeronimoServerBehaviourDelegate.java internal/DependencyHelper.java
Date Fri, 04 Sep 2009 09:29:39 GMT
Author: delos
Date: Fri Sep  4 09:29:38 2009
New Revision: 811320

URL: http://svn.apache.org/viewvc?rev=811320&view=rev
Log:
GERONIMODEVTOOLS-361 GEP DependencyHelper not interrogating all contents of EAR files for
dependencies

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java?rev=811320&r1=811319&r2=811320&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
Fri Sep  4 09:29:38 2009
@@ -239,7 +239,7 @@
         //
         if (modules != null && modules.size() > 0) {
             DependencyHelper dh = new DependencyHelper();
-            List list = dh.reorderModules(modules, deltaKind);
+            List list = dh.reorderModules(this.getServer(),modules, deltaKind);
             modules = (List) list.get(0);
             deltaKind = (List) list.get(1);
         }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java?rev=811320&r1=811319&r2=811320&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
Fri Sep  4 09:29:38 2009
@@ -39,6 +39,7 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
 import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
 
 /**
@@ -74,7 +75,7 @@
      * 
      * @return List of reordered modules and deltaKind (or input if no change)
      */
-    public List reorderModules( List modules, List deltaKind ) {
+    public List reorderModules(IServer server, List modules, List deltaKind ) {
         Trace.tracePoint("Entry", "DependencyHelper.reorderModules", modules, deltaKind);
 
         if (modules.size() == 0) {
@@ -95,22 +96,26 @@
             IModule[] module = (IModule[]) modules.get(ii);
             int moduleDeltaKind = ((Integer)deltaKind.get(ii)).intValue();
             if (moduleDeltaKind != ServerBehaviourDelegate.REMOVED) {
-                Environment environment = getEnvironment(module[0]);
-                if (environment != null) {
-                    Artifact child = environment.getModuleId();
-                    Dependencies dependencies = environment.getDependencies();
-                    if (dependencies != null) {
-                        List<Dependency> depList = dependencies.getDependency();
-                        for ( Dependency dep : depList) {
-                            Artifact parent = deploymentFactory.createArtifact();
-                            parent.setGroupId( dep.getGroupId() );
-                            parent.setArtifactId( dep.getArtifactId() );
-                            parent.setVersion( dep.getVersion() );
-                            parent.setType( dep.getType() );
-                            dm.addDependency( child, parent );
-                        }
-                    }
-                }
+            	//GERONIMODEVTOOLS-361
+            	for (IModule singleModule:module){
+            		Environment environment = getEnvironment(singleModule);
+	                if (environment != null) {
+	                    Artifact child = environment.getModuleId();
+	                    Dependencies dependencies = environment.getDependencies();
+	                    if (dependencies != null) {
+	                        List<Dependency> depList = dependencies.getDependency();
+	                        for ( Dependency dep : depList) {
+	                            Artifact parent = deploymentFactory.createArtifact();
+	                            parent.setGroupId( dep.getGroupId() );
+	                            parent.setArtifactId( dep.getArtifactId() );
+	                            parent.setVersion( dep.getVersion() );
+	                            parent.setType( dep.getType() );
+	                            
+	                           	dm.addDependency( child, parent );
+	                        }
+	                    }
+	                }
+            	}
             }
         }
 



Mime
View raw message