[ 
https://issues.apache.org/jira/browse/MPLUGIN-408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566980#comment-17566980
 ] 

Herve Boutemy commented on MPLUGIN-408:
---------------------------------------

IMHO, what could be removed is the javadoc annotations discovery, that in the 
past could find the java package early: nowadays, it's a known fact that java 
package name won't be found found when generating source, then keeping old code 
that tries to inject java package name early is just adding complexity for 
nothing

> simplification in helpmojo build
> --------------------------------
>
>                 Key: MPLUGIN-408
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-408
>             Project: Maven Plugin Tools
>          Issue Type: Wish
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> h2. Current situation
> - {{helpmojo}} extends {{AbstractGeneratorMojo}}
> - {{helpmojo}} is bound to {{generate-sources}} phase
> We have following steps for generate a {{HelpMojo}} for a plugin:
>  - {{helpmojo}} *builds plugin.xml descriptor* by discovering mojos in 
> project, when we use {{@Mojo}} annotations for goals descriptions no mojo are 
> discovered ... it is before compilation
>  - try to discover package for {{HelpMojo}}, because descriptor is empty - 
> *empty package* is used for generating source for {{HelpMojo}}
> Next in {{descriptor}} goal
>  - once again *build plugin descriptors* by discovering mojos in project
>  - now we can have mojo so we can calculate package name
>  - empty package name of {{HelpMojo}} is rewrited in generated source code
>  - using ASM package in class of {{HelpMojo}} is changed
>  - source code and compiled class are moved to correct directory
> h2. Simplification proposition
>  - fix package of {{HelpMojo}} to {{groupId.artifactId}}
>  - cleanup code



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to