You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamás Cservenák (Jira)" <ji...@apache.org> on 2021/04/28 12:05:00 UTC
[jira] [Updated] (MPLUGIN-372) Descriptor generation does not work
when Mojo class hierarchy extends provided class
[ https://issues.apache.org/jira/browse/MPLUGIN-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamás Cservenák updated MPLUGIN-372:
------------------------------------
Description:
As part of work on MPLUGIN-370 took an example plugin (m-dependency-p) and just set it's 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)?
was:
As part of work on MPLUGIN-370 took an example plugin (m-dependency-p) and just set it's maven dependencies to provided. Build exploded with NoClassDefFoundEx.
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)?
> Descriptor generation does not work when Mojo class hierarchy extends provided class
> ------------------------------------------------------------------------------------
>
> Key: MPLUGIN-372
> URL: https://issues.apache.org/jira/browse/MPLUGIN-372
> Project: Maven Plugin Tools
> Issue Type: Task
> Components: maven-plugin-tools-annotations, Plugin Plugin
> Reporter: Tamás Cservenák
> Priority: Major
>
> As part of work on MPLUGIN-370 took an example plugin (m-dependency-p) and just set it's 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)?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)