You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2009/01/07 21:53:00 UTC
svn commit: r732483 - in /ant/ivy/core/branches/2.0.0: CHANGES.txt
doc/release-notes.html
src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Author: maartenc
Date: Wed Jan 7 12:53:00 2009
New Revision: 732483
URL: http://svn.apache.org/viewvc?rev=732483&view=rev
Log:
FIX: NullPointerException at PomModuleDescriptorBuilder.addDependency (IVY-995)
Modified:
ant/ivy/core/branches/2.0.0/CHANGES.txt
ant/ivy/core/branches/2.0.0/doc/release-notes.html
ant/ivy/core/branches/2.0.0/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Modified: ant/ivy/core/branches/2.0.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.0/CHANGES.txt?rev=732483&r1=732482&r2=732483&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.0/CHANGES.txt (original)
+++ ant/ivy/core/branches/2.0.0/CHANGES.txt Wed Jan 7 12:53:00 2009
@@ -86,6 +86,7 @@
- IMPROVEMENT: Ivy Standalone setting to overwrite publications (IVY-976)
- IMPROVEMENT: Support useOrigin for artifacts with a set url attribute (IVY-965) (thanks to alex322)
+- FIX: NullPointerException at PomModuleDescriptorBuilder.addDependency (IVY-995)
- FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960) (thanks to Patrick Woodworth)
- FIX: NPE in LogReportOutputter (IVY-961)
- FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980)
Modified: ant/ivy/core/branches/2.0.0/doc/release-notes.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.0/doc/release-notes.html?rev=732483&r1=732482&r2=732483&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.0/doc/release-notes.html (original)
+++ ant/ivy/core/branches/2.0.0/doc/release-notes.html Wed Jan 7 12:53:00 2009
@@ -157,6 +157,7 @@
- IMPROVEMENT: Ivy Standalone setting to overwrite publications (IVY-976)
- IMPROVEMENT: Support useOrigin for artifacts with a set url attribute (IVY-965) (thanks to alex322)
+- FIX: NullPointerException at PomModuleDescriptorBuilder.addDependency (IVY-995)
- FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960) (thanks to Patrick Woodworth)
- FIX: NPE in LogReportOutputter (IVY-961)
- FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980)
Modified: ant/ivy/core/branches/2.0.0/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.0/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=732483&r1=732482&r2=732483&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.0/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java (original)
+++ ant/ivy/core/branches/2.0.0/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java Wed Jan 7 12:53:00 2009
@@ -17,7 +17,6 @@
*/
package org.apache.ivy.plugins.parser.m2;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -270,14 +269,11 @@
ivyModuleDescriptor.addArtifact("master", mainArtifact);
}
-
- public void addDependency(Resource res, PomDependencyData dep) throws ParseException {
+ public void addDependency(Resource res, PomDependencyData dep) {
String scope = dep.getScope();
if ((scope != null) && (scope.length() > 0) && !MAVEN2_CONF_MAPPING.containsKey(scope)) {
- String msg = "Unknown scope '" + scope + "' for dependency "
- + ModuleId.newInstance(dep.getGroupId(), dep.getArtifactId()) + " in "
- + res.getName();
- throw new ParseException(msg, 0);
+ // unknown scope, defaulting to 'compile'
+ scope = "compile";
}
String version = dep.getVersion();
@@ -408,7 +404,7 @@
private String getDefaultScope(PomDependencyData dep) {
String key = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(), dep.getArtifactId());
String result = (String) ivyModuleDescriptor.getExtraInfo().get(key);
- if (result == null) {
+ if ((result == null) || !MAVEN2_CONF_MAPPING.containsKey(result)) {
result = "compile";
}
return result;