Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to declare a before and after execution of a maven plugin around another plugin execution?
    primarykey
    data
    text
    <p>I would like to create an execution order in my plugin which surrounds a maven plugin with a before and after execution of another maven plugin. All 3 executions are part of the deploy phase.</p> <p>Here is an example of what I want to do: </p> <ul> <li>phase:deploy</li> <li>url:get: execution-before</li> <li>dependency:unpack</li> <li>url:get: execution-after</li> </ul> <p>Note: url:get is my own custo mojo and just executes an http get using commons httpClient.</p> <p>I would usually attach the after plugin execution in the next phase but unfortunately deploy is the last phase of the jar lifecycle.</p> <p>Thank you in advance,</p> <p>Kostas</p> <hr> <p>Note: The following plugins segment from my pom file creates the following execution order which is not expected:</p> <ul> <li>phase:deploy</li> <li>url:get: execution-before</li> <li>url:get: execution-after</li> <li>dependency:unpack</li> </ul> <p>Plugin segment:</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;com.blabla.stpadmin&lt;/groupId&gt; &lt;artifactId&gt;maven-url-plugin&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;stop-stpadmin-service&lt;/id&gt; &lt;phase&gt;deploy&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;get&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; ... &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;unpack&lt;/id&gt; &lt;phase&gt;deploy&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;unpack&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; ... &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;com.blabla.stpadmin&lt;/groupId&gt; &lt;artifactId&gt;maven-url-plugin&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;start-stpadmin-service&lt;/id&gt; &lt;phase&gt;deploy&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;get&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; ... &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre>
    singulars
    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.
 

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