You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rice Yeh <ri...@gmail.com> on 2005/10/26 10:48:09 UTC

[m2] NullPointerException in following the say hi example in plugin development doc

Hi,
I follows the plugin development at
http://maven.apache.org/maven2/guides/plugin/guide-java-plugin-development.html
to build the say hi plugin example. I have successfully install this plugin.
But when running this plugin when
commnad line
mvn sample.plugin:maven-hello-plugin:1.0-SNAPSHOT:sayhi
, a NullPointerException has occured. Anything missing in the doc? or just I
did something wrong?


D:\workspaces\practice\Helloworld Maven Plugin>mvn
sample.plugin:maven-hello-plu
gin:1.0-SNAPSHOT:sayhi
[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(PluginDes
criptor.java:261)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1363)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy
AggregationNeeds(DefaultLifecycleExecutor.java:376)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:132)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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]
-------------------------------------------------------------------------


Regards,
Rice