[
https://issues.apache.org/jira/browse/MPLUGIN-408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566976#comment-17566976
]
Herve Boutemy commented on MPLUGIN-408:
---------------------------------------
guessing a java package name by using groupId + artifactId will lead to
surprising results
> Improvement in helpmojo build
> -----------------------------
>
> Key: MPLUGIN-408
> URL: https://issues.apache.org/jira/browse/MPLUGIN-408
> Project: Maven Plugin Tools
> Issue Type: Improvement
> Reporter: Slawomir Jaranowski
> Priority: Major
>
> - {{helpmojo}} extends {{AbstractGeneratorMojo}}
> - {{helpmojo}} in bind to {{generate-sources}} phase
> We have such steps for generate a {{HelpMojo}}
> - {{helpmojo}} *build plugin descriptors* by discovering mojos in project,
> when we use annotations for plugin 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
> Proposition:
> - fix package of {{HelpMojo}} to {{groupId.artifactId}}
> - cleanup code
--
This message was sent by Atlassian Jira
(v8.20.10#820010)