Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-103

Plugins without descriptors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • API
    • None
    • Patch

    Description

      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.

      Attachments

        1. numMojoDescriptors.patch
          2 kB
          Jochen Walz
        2. maven-no-plugin-descriptors.patch
          2 kB
          Jochen Walz

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jochen.wiedmann@gmail.com Jochen Wiedmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: