Description
Using the latest build from trunk: If the ivy settings xml file contains a custom attribute, such as myextra suggested by the ivy documentation http://ant.apache.org/ivy/history/trunk/configuration/module.html:
<modules> <module organisation="apache" name="commons-[a-z]+" myextra="val.*" matcher="regexp" resolver="myapachecommonsresolver"/> </modules>
Then ivy:settings target works fine, but a subsequent ivy:install fails with the following NPE:
D:\ws\eclipse-3.3.1\AAD\build\ivy-repository-copy\build.xml:16: java.lang.NullPointerException at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.NullPointerException at org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexpMatcher.matches(ExactOrRegexpPatternMatcher.java:53) at org.apache.ivy.plugins.matcher.MapMatcher.matches(MapMatcher.java:48) at org.apache.ivy.core.module.id.ModuleRules.getRule(ModuleRules.java:166) at org.apache.ivy.core.module.id.ModuleRules.getRule(ModuleRules.java:141) at org.apache.ivy.core.settings.IvySettings.getDefaultBranch(IvySettings.java:842) at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:84) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) ... 11 more --- Nested Exception --- java.lang.NullPointerException at org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexpMatcher.matches(ExactOrRegexpPatternMatcher.java:53) at org.apache.ivy.plugins.matcher.MapMatcher.matches(MapMatcher.java:48) at org.apache.ivy.core.module.id.ModuleRules.getRule(ModuleRules.java:166) at org.apache.ivy.core.module.id.ModuleRules.getRule(ModuleRules.java:141) at org.apache.ivy.core.settings.IvySettings.getDefaultBranch(IvySettings.java:842) at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:84) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
The NPE goes away if the myextra attribute is changed into a standard attribute such as 'branch'.