java - How to attach a maven plugin to a phase by default? -
i have maven plugin should run in compile phase, in project consumes plugin, have this:
<executions> <execution> <phase>compile</phase> <goals> <goal>my-goal</goal> </goals> </execution> </executions>
what need by default attach my-goal
compile phase if user has included plugin (ideally above part wouldn't necessary, plugin declaration).
is possible?
put @phase
annotation in mojo classdef annotations.
the doc says:
@phase <phasename>
this annotation specifies default phase goal. if add execution goal pom.xml , not specify phase, maven bind goal phase specified in annotation default.
if doesn't work, guess jira warranted.
Comments
Post a Comment