You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anton Ananich (JIRA)" <ji...@codehaus.org> on 2007/07/11 08:14:13 UTC
[jira] Created: (MNG-3100) Problem during Ant Plugin development
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
[jira] Closed: (MPLUGIN-41) Problem during Ant Plugin development
Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPLUGIN-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Siveton closed MPLUGIN-41.
----------------------------------
Assignee: Vincent Siveton
Resolution: Cannot Reproduce
Cannot reproduce on trunk
> Problem during Ant Plugin development
> -------------------------------------
>
> Key: MPLUGIN-41
> URL: http://jira.codehaus.org/browse/MPLUGIN-41
> Project: Maven 2.x Plugin Tools
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Anton Ananich
> Assignee: Vincent Siveton
> 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
[jira] Moved: (MPLUGIN-41) Problem during Ant Plugin development
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPLUGIN-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter moved MNG-3100 to MPLUGIN-41:
------------------------------------------
Affects Version/s: (was: Documentation Deficit)
2.3
Component/s: (was: Documentation: Guides)
Key: MPLUGIN-41 (was: MNG-3100)
Project: Maven 2.x Plugin Plugin (was: Maven 2)
> Problem during Ant Plugin development
> -------------------------------------
>
> Key: MPLUGIN-41
> URL: http://jira.codehaus.org/browse/MPLUGIN-41
> Project: Maven 2.x Plugin Tools
> Issue Type: Bug
> Affects Versions: 2.3
> 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
[jira] Commented: (MNG-3100) Problem during Ant Plugin development
Posted by "Marat Radchenko (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Commented: (MNG-3100) Problem during Ant Plugin development
Posted by "Slawomir Węgrzyn (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103104 ]
Slawomir Węgrzyn commented on MNG-3100:
--------------------------------------------
I've found why the example didn't work. I put both scripts ('basename'.build.xml & 'basename'.mojos.xml) in project's main directory not in src/main/scripts as was suggested. After moving files to mentioned location all works well.
> 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
[jira] Commented: (MNG-3100) Problem during Ant Plugin development
Posted by "Slawomir Węgrzyn (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103083 ]
Slawomir Węgrzyn commented on MNG-3100:
--------------------------------------------
I've also experienced this problem. Could anyone provide possible solution?
> 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