geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1021387 - /geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
Date Mon, 11 Oct 2010 15:35:03 GMT
Author: gawor
Date: Mon Oct 11 15:35:03 2010
New Revision: 1021387

URL: http://svn.apache.org/viewvc?rev=1021387&view=rev
Log:
fix build break - check for null

Modified:
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java?rev=1021387&r1=1021386&r2=1021387&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
(original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
Mon Oct 11 15:35:03 2010
@@ -261,9 +261,10 @@ public class PluginMetadataGeneratorMojo
             instance.setModuleId(artifactType);
             addDependencies(instance);
             
-            //this module is embeded into the car, we don't want to install it as a dependency
again.
-            this.removeIncludedModule(instance.getDependency(), module);
-
+            // this module is embeded into the car, we don't want to install it as a dependency
again.
+            if (module != null) {
+                removeIncludedModule(instance.getDependency(), module);
+            }
             
             targetDir.mkdirs();
             File targetFile = new File(targetDir.toURI().resolve(pluginMetadataFileName));
@@ -306,17 +307,14 @@ public class PluginMetadataGeneratorMojo
     }
     
     private void removeIncludedModule(List<DependencyType> sourceList, Dependency removeTarget)
{
-       
         for (DependencyType dependencyType : sourceList) {
             if ((dependencyType.getArtifactId().equals(removeTarget.artifactId))
                     && (dependencyType.getGroupId().equals(removeTarget.groupId))
                     && (dependencyType.getType().equals(removeTarget.type))
                     && (dependencyType.getVersion().equals(removeTarget.version)))
{
-
                 sourceList.remove(dependencyType);
             }
         }
-            
     }
 
 }



Mime
View raw message