ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r690952 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Mon, 01 Sep 2008 12:10:09 GMT
Author: xavier
Date: Mon Sep  1 05:10:09 2008
New Revision: 690952

URL: http://svn.apache.org/viewvc?rev=690952&view=rev
Log:
FIX: NPE for modules with 'pom' packaging (no main artifact)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=690952&r1=690951&r2=690952&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Mon Sep  1 05:10:09 2008
@@ -255,6 +255,10 @@
 
     private void addSourcesAndJavadocArtifactsIfPresent(
             PomModuleDescriptorBuilder mdBuilder, ParserSettings ivySettings) {
+        if (mdBuilder.getMainArtifact() == null) {
+            // no main artifact in pom, we don't need to search for meta artifacts
+            return;
+        }
         ModuleDescriptor md = mdBuilder.getModuleDescriptor();
         ModuleRevisionId mrid = md.getModuleRevisionId();
         DependencyResolver resolver = ivySettings.getResolver(



Mime
View raw message