You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org> on 2007/03/23 05:24:36 UTC

[jira] Updated: (MNG-1889) Plugins without descriptors

     [ http://jira.codehaus.org/browse/MNG-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann updated MNG-1889:
---------------------------------

    Attachment: maven-no-plugin-descriptors.patch

Here's an updated version. Please note, that I had to catch the new exception in the test suite at some point. It mighe be better to remove the final check for size() == 0 in that test.


> Plugins without descriptors
> ---------------------------
>
>                 Key: MNG-1889
>                 URL: http://jira.codehaus.org/browse/MNG-1889
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugin Creation Tools
>    Affects Versions: 2.0.1
>            Reporter: Jochen Wiedmann
>            Priority: Minor
>             Fix For: 2.0.x
>
>         Attachments: maven-no-plugin-descriptors.patch, numMojoDescriptors.patch
>
>
> The attached patch throws an exception, if no Mojos are found in a plugin.
> Background: If such a plugin is installed, then an NPE is caused in the DefaultLifeCycleExecutor, which properly assumes, that a plugin contains Mojo descriptors. Obviously, the actual error is in the plugin itself, where it should be exposed. It took me some hours to find this actual reason. (I still do not know, why the Mojos aren't found in my plugin, but that's another story.) The patch should be able to save the same number of hours for other plugin developers.
> Note: The InvalidPluginDescriptorException, which is triggered by the patch, is possibly not proper. I choosed it, because it allowed to leave the method signature unchanged and keep the patch simple. It is up to the reviewer to choose another exception.

-- 
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