You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anton Ananich <an...@gmail.com> on 2007/07/10 19:11:18 UTC

Problem during Ant Plugin development

Dear All!

I'm investigating this manual about Developing Ant Plugins for Maven 2.x:
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

I try to create the easiest HelloWorld plugin. As described in this manual:
1) I create Ant script
2) I create mojo
3) I create pom
4) I build it and install (successfully)
And than I try to run it:

c:\> mvn org.myproject.plugins:hello-plugin:hello

Here is what I got:

[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(PluginDescriptor.java:262)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1529)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:386)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        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: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 10 20:02:10 EEST 2007
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------

It seems to me that it is a bug in maven or in developer's guide. How
can I fix this ar walk around?

With best regards,
Anton Ananich
Minsk, Belarus (GMT+2)

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