Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, you can't bind to a plugin to another plugin. Only to a phase.</p> <p>In Maven-internal terms, a "Mojo" is the thing that does work. A "plugin" is a collection of mojos wrapped up so you can reference them from the POM. Mojos bind to phases only.</p> <p>From the <a href="http://maven.apache.org/developers/mojo-api-specification.html" rel="noreferrer">plugin development documentation</a>:</p> <blockquote> <p>Each Mojo specified inside a plugin descriptor must provide the following</p> <p>...</p> <p><strong>phase</strong> ... Defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM. Note: This annotation will not automagically make a mojo run when the plugin declaration is added to the POM. It merely enables the user to omit the <code>&lt;phase&gt;</code> element from the surrounding <code>&lt;execution&gt;</code> element.</p> </blockquote> <p>For further confirmation, see the source of <a href="https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob_plain;f=maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java" rel="noreferrer">MojoExecution</a> (the <a href="http://maven.apache.org/ref/3.0.5/maven-core/apidocs/org/apache/maven/plugin/MojoExecution.html" rel="noreferrer">JavaDoc</a> for this class isn't helpful) and notice that there are two possible sources of execution enumerated:</p> <blockquote> <p>An execution that originates from the direct invocation of a goal from the CLI</p> </blockquote> <p>and</p> <blockquote> <p>An execution that originates from a goal bound to a lifecycle phase</p> </blockquote> <p>No other way to kick off an execution means you're out of luck (barring extraordinary measures like rolling your own plugin that combines the effects of the two plugins you want to link and then using your custom plugin).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload