You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Wall <cw...@bea.com> on 2006/07/19 00:36:07 UTC

NPE for Ant plugin example

I attempted to create the hello example outlined here: 
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
 
But, I'm getting the following.  See attached pom.xml.  Maven 2.0.2.
Known issue?
 
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at
org.apache.maven.plugin.descriptor.PluginDescriptor.getMojo(PluginDescri
ptor.java:259)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
faultLifecycleExecutor.java:1524)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAgg
regationNeeds(DefaultLifecycleExecutor
.java:381)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:135)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jul 18 17:33:39 CDT 2006
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------
 
-Chris
 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

RE: NPE for Ant plugin example

Posted by Chris Wall <cw...@bea.com>.
My bad.  My mojo meta-data file and Ant script were located in
src/scripts instead of src/main/scripts (default).
 
Although, the NPE (all NPEs) should be translated to a more meaningful
message.
 
Thanks.
 
________________________________

From: Chris Wall 
Sent: July 18, 2006 5:36 PM
To: users@maven.apache.org
Subject: NPE for Ant plugin example
 
I attempted to create the hello example outlined here:
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
 
But, I'm getting the following.  See attached pom.xml.  Maven 2.0.2.
Known issue?
 
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at
org.apache.maven.plugin.descriptor.PluginDescriptor.getMojo(PluginDescri
ptor.java:259)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
faultLifecycleExecutor.java:1524)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAgg
regationNeeds(DefaultLifecycleExecutor
.java:381)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:135)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jul 18 17:33:39 CDT 2006
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------
 
-Chris
 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.