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

Descriptor generation does not work when Mojo class hierarchy extends provided class

    XMLWordPrintableJSON

Details

    Description

      As part of work on MPLUGIN-370 took an example plugin (m-dependency-p) and just set its maven dependencies to provided. Build exploded with NoClassDefFoundEx (usually for AbstractMojo). Nb: error reporting could be improved, as even with debug output nothing is said why this happened.

      Reason is that DescriptorGeneratorMojo sets ResolutionScope.RUNTIME that *excludes* provided dependencies (like maven-plugin-api, where AbstractMojo is).

      Setting the descriptor mojo scope to ResolutionScope.COMPILE_PLUS_RUNTIME make it work just fine.

      Anyone have any idea why Descriptor Mojo uses RUNTIME scope (hence, omits provided artifacts from processing)?

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamás Cservenák
              cstamas Tamás Cservenák
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: