ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: svn commit: r635977 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Wed, 12 Mar 2008 10:49:18 GMT
On Wed, Mar 12, 2008 at 8:35 AM, Gilles Scokart <gscokart@gmail.com> wrote:
> Is it just a warning?  Don't you think it should be an error?  It is
>  actually an entire part of your module descriptor that can not be read
>  (including some dependencies).
>
>  WDYT?

It depends what you mean by an error. If you mean using the error
level for the message, it makes sense. If you meaning throwing a
ParseException, then I don't know... Throwing an exception would
better fit Ivy philosophy about consistency checking. And I guess
maven also halt the build if it doesn't find the parent, right? So
indeed even halting the parsing with a ParseException would make
sense.

WDYT?

Xavier

>  Gilles
>
>
>
>  On 11/03/2008, xavier@apache.org <xavier@apache.org> wrote:
>  > Author: xavier
>  >  Date: Tue Mar 11 08:37:15 2008
>  >  New Revision: 635977
>  >
>  >  URL: http://svn.apache.org/viewvc?rev=635977&view=rev
>  >  Log:
>  >  prevent NPE when loading parent pom failed
>  >
>  >  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=635977&r1=635976&r2=635977&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
Tue Mar 11 08:37:15 2008
>  >  @@ -171,7 +171,12 @@
>  >                          domReader.getParentVersion());
>  >                      ResolvedModuleRevision parentModule = parseOtherPom(ivySettings,
>  >                          parentModRevID);
>  >  -                    parentDescr = parentModule.getDescriptor();
>  >  +                    if (parentModule != null) {
>  >  +                        parentDescr = parentModule.getDescriptor();
>  >  +                    } else {
>  >  +                       Message.warn("impossible to load parent for " + descriptorURL
+ "."
>  >  +                           + " Parent=" + parentModRevID);
>  >  +                    }
>  >                  }
>  >
>  >                  Map pomProperties = domReader.getPomProperties();
>  >
>  >
>  >
>
>
>  --
>  Gilles Scokart
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>  For additional commands, e-mail: dev-help@ant.apache.org
>
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message