[ http://jira.codehaus.org/browse/MNG-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104123 ]
Marat Radchenko commented on MNG-3100: -------------------------------------- I got the same exception for java plugin without @goal annotation. > Problem during Ant Plugin development > ------------------------------------- > > Key: MNG-3100 > URL: http://jira.codehaus.org/browse/MNG-3100 > Project: Maven 2 > Issue Type: Bug > Components: Documentation: Guides > Affects Versions: Documentation > Reporter: Anton Ananich > Priority: Critical > > 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] > ------------------------------------------------------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira