[
https://jira.codehaus.org/browse/MPLUGIN-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359805#comment-359805
]
Joseph Walton commented on MPLUGIN-277:
---------------------------------------
You're absolutely right; this is invalid.
I was running into MPLUGIN-238 and avoided build failure by moving {{helpmojo}}
into {{process-classes}}. This avoided the error (as the annotated classes were
now present), but I hadn't noticed that it was generating a {{HelpMojo.java}}
that was never compiled.
The first comment on MNG-5346 suggests {{process-classes}}, as do a number of
Stackoverflow answers (http://stackoverflow.com/a/18999968,
http://stackoverflow.com/a/23405494) which were presumably copied from there.
This works for me:
{code}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
</execution>
</executions>
</plugin>
{code}
and I will be able to drop the {{sENDF}} when 3.4 is released.
> Default phase for helpmojo should agree with that for descriptor
> ----------------------------------------------------------------
>
> Key: MPLUGIN-277
> URL: https://jira.codehaus.org/browse/MPLUGIN-277
> Project: Maven Plugin Tools
> Issue Type: Improvement
> Components: Plugin Plugin
> Affects Versions: 3.3
> Reporter: Joseph Walton
>
> Since MPLUGIN-189, {{descriptor}} has a default phase of {{process-classes}}.
> Since MNG-5346, that's also the phase of the default execution in the default
> lifecycle binding. However, {{helpmojo}} still has a default phase of
> {{generate-sources}}, which needs to be overridden when using annotations.
> That is, I need to specify:
> {noformat}
> <execution>
> <id>help-goal</id>
> <phase>process-classes</phase>
> <goals>
> <goal>helpmojo</goal>
> </goals>
> </execution>
> {noformat}
> Changing the default phase would only save one of those lines, but it would
> make things more consistent between the two goals.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)