You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Torsten Krall <tk...@tkl-soft.de> on 2007/06/19 20:44:44 UTC

NullPointer with maven-ant-tasks-2.0.6 (linux)

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


Re: NullPointer with maven-ant-tasks-2.0.6 (linux)

Posted by Torsten Krall <tk...@tkl-soft.de>.
Yes, thanks, that was the problem. :-)

Regards,
Torsten


Hervé BOUTEMY wrote:
> I opened http://jira.codehaus.org/browse/MANTTASKS-75, with testcase and 
> patch: it should be included in next Maven Ant Tasks version, 2.0.7, 
> scheduled next week.
>
> Hervé
>
> Le jeudi 21 juin 2007, Hervé BOUTEMY a écrit :
>   
>> 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:11
>>> 5) 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.getDefaultLocalReposit
>>> or y(AbstractArtifactTask.java:166) at
>>> org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRep
>>> os itory(AbstractArtifactTask.java:79) at
>>> org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask
>>> .j ava:80) at
>>> org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifa
>>> ct 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(DelegatingMethodAccessorI
>>> mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>>         at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:10
>>> 5) ... 8 more
>>> --- Nested Exception ---
>>> java.lang.NullPointerException
>>>         at java.io.File.<init>(File.java:222)
>>>         at
>>> org.apache.maven.artifact.ant.AbstractArtifactTask.getDefaultLocalReposit
>>> or y(AbstractArtifactTask.java:166) at
>>> org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRep
>>> os itory(AbstractArtifactTask.java:79) at
>>> org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask
>>> .j ava:80) at
>>> org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifa
>>> ct 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(DelegatingMethodAccessorI
>>> mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>>         at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:10
>>> 5) 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
>>     
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>   

Re: NullPointer with maven-ant-tasks-2.0.6 (linux)

Posted by Hervé BOUTEMY <he...@free.fr>.
I opened http://jira.codehaus.org/browse/MANTTASKS-75, with testcase and 
patch: it should be included in next Maven Ant Tasks version, 2.0.7, 
scheduled next week.

Hervé

Le jeudi 21 juin 2007, Hervé BOUTEMY a écrit :
> 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:11
> >5) 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.getDefaultLocalReposit
> >or y(AbstractArtifactTask.java:166) at
> > org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRep
> >os itory(AbstractArtifactTask.java:79) at
> > org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask
> >.j ava:80) at
> > org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifa
> >ct 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(DelegatingMethodAccessorI
> >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> >         at
> > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:10
> >5) ... 8 more
> > --- Nested Exception ---
> > java.lang.NullPointerException
> >         at java.io.File.<init>(File.java:222)
> >         at
> > org.apache.maven.artifact.ant.AbstractArtifactTask.getDefaultLocalReposit
> >or y(AbstractArtifactTask.java:166) at
> > org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRep
> >os itory(AbstractArtifactTask.java:79) at
> > org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask
> >.j ava:80) at
> > org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifa
> >ct 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(DelegatingMethodAccessorI
> >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> >         at
> > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:10
> >5) 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



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


Re: NullPointer with maven-ant-tasks-2.0.6 (linux)

Posted by Hervé BOUTEMY <he...@free.fr>.
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


Re: NullPointer with maven-ant-tasks-2.0.6 (linux)

Posted by Torsten Krall <tk...@tkl-soft.de>.
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.getDefaultLocalRepository(AbstractArtifactTask.java:166)
        at 
org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRepository(AbstractArtifactTask.java:79)
        at 
org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:80)
        at 
org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.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:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.getDefaultLocalRepository(AbstractArtifactTask.java:166)
        at 
org.apache.maven.artifact.ant.AbstractArtifactTask.createLocalArtifactRepository(AbstractArtifactTask.java:79)
        at 
org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:80)
        at 
org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.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:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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
>
>   

Re: NullPointer with maven-ant-tasks-2.0.6 (linux)

Posted by Hervé BOUTEMY <he...@free.fr>.
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