ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (IVY-838) NPE in ivy:install if ivy.settings.xml contains custom attribute for a module
Date Thu, 12 Jun 2008 22:18:44 GMT

     [ https://issues.apache.org/jira/browse/IVY-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maarten Coene resolved IVY-838.
-------------------------------

    Resolution: Fixed

Added junit test and fixed the NPE.
Could you verify if it works for you now?

> NPE in ivy:install if ivy.settings.xml contains custom attribute for a module
> -----------------------------------------------------------------------------
>
>                 Key: IVY-838
>                 URL: https://issues.apache.org/jira/browse/IVY-838
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC1
>            Reporter: Erik-Berndt Scheper
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC1
>
>
> 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:
> {code:xml}
> <modules>
>   <module organisation="apache" name="commons-[a-z]+" myextra="val.*" matcher="regexp"
resolver="myapachecommonsresolver"/>
> </modules>
> {code}
> Then ivy:settings target works fine, but a subsequent ivy:install fails with the following
NPE:
> {noformat}
> 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)
> {noformat}
> The NPE goes away if the myextra attribute is changed into a standard attribute such
as 'branch'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message