maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BOUTEMY <herve.bout...@free.fr>
Subject Re: NullPointer with maven-ant-tasks-2.0.6 (linux)
Date Thu, 21 Jun 2007 05:32:44 GMT
ok
I think the problem in that your settings.xml file on your Linux machine does 
not define <localRepository> element (which seems defined on your Windows 
one), and the code is not protected against such a thing

please: 
1. confirm this explaination
2. file a Jira issue to let me provide a patch

Regards,

Hervé

Le mercredi 20 juin 2007, Torsten Krall a écrit :
> Now I get the following detailed stacktrace:
>
> [..]
> Finding class org.apache.maven.artifact.versioning.Restriction
> Loaded from /home/maj0r/source/JWWatcher/build/maven-ant-tasks-2.0.6.jar
> org/apache/maven/artifact/versioning/Restriction.class
> Class org.apache.maven.artifact.versioning.Restriction loaded from ant
> loader (parentFirst)
>
> BUILD FAILED
> /home/maj0r/source/JWWatcher/build/build.xml:10:
> 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.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
>         at org.apache.tools.ant.Main.runBuild(Main.java:683)
>         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 java.io.File.<init>(File.java:222)
>         at
> org.apache.maven.artifact.ant.AbstractArtifactTask.getDefaultLocalRepositor
>y(AbstractArtifactTask.java:166) at
> org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRepos
>itory(AbstractArtifactTask.java:79) at
> org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.j
>ava:80) at
> org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifact
>Task.java:469) at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
>         ... 8 more
> --- Nested Exception ---
> java.lang.NullPointerException
>         at java.io.File.<init>(File.java:222)
>         at
> org.apache.maven.artifact.ant.AbstractArtifactTask.getDefaultLocalRepositor
>y(AbstractArtifactTask.java:166) at
> org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRepos
>itory(AbstractArtifactTask.java:79) at
> org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.j
>ava:80) at
> org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifact
>Task.java:469) at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>         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.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
>         at org.apache.tools.ant.Main.runBuild(Main.java:683)
>         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)
>
> Total time: 4 seconds
>
> Regards,
> Torsten Krall
>
> Hervé BOUTEMY wrote:
> > Hi,
> >
> > I'm working on these tasks under Linux without any problem.
> > Can you run "ant -d" and give me the full stacktrace?
> >
> > Hervé
> >
> > Le mardi 19 juin 2007, Torsten Krall a écrit :
> >> Hi,
> >>
> >> I use following build.xml:
> >>
> >> <project name="myproject" default="complete" basedir=".."
> >> xmlns:artifact="urn:maven-artifact-ant">
> >>
> >>    <path id="maven-ant-tasks.classpath"
> >> path="${basedir}/build/maven-ant-tasks-2.0.6.jar" />
> >>    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
> >> uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
> >>
> >>    <artifact:pom file="${basedir}/pom.xml" id="maven.project" />
> >>
> >> LINE10:    <artifact:dependencies
> >> settingsFile="${user.home}/.m2/settings.xml" pathId="compile.classpath"
> >> filesetId="compile.fileset" useScope="compile">
> >>        <pom refid="maven.project" />
> >>    </artifact:dependencies>
> >>
> >> [..]
> >>
> >>
> >> Executing this script I get the following error but this script works
> >> well with windows and no change at all.
> >>
> >> Buildfile: /home/maj0r/source/JWWatcher/build/build.xml
> >>
> >> BUILD FAILED
> >> /home/maj0r/source/JWWatcher/build/build.xml:10:
> >> java.lang.NullPointerException
> >>
> >> Total time: 956 milliseconds
> >>
> >>
> >> Does anyone have the same problem or a hint for me?
> >>
> >> Regards,
> >> Torsten
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message