Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to bind a plugin goal to another plugin goal
    primarykey
    data
    text
    <p>In my current project we use some plugins needed by other plugins parameters like properties-maven-plugin or buildnumber-plugin.</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;project&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;mygroup&lt;/groupId&gt; &lt;artifactId&gt;myartifact&lt;/artifactId&gt; &lt;packaging&gt;pom&lt;/packaging&gt; &lt;version&gt;v0&lt;/version&gt; &lt;name&gt;myProject&lt;/name&gt; &lt;properties&gt; &lt;env&gt;dev&lt;/env&gt; &lt;/properties&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;properties-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.0-alpha-2&lt;/version&gt; &lt;configuration&gt; &lt;files&gt; &lt;file&gt;${basedir}/configurations/${env}.properties&lt;/file&gt; &lt;/files&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;initialize&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;read-project-properties&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;buildnumber-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.0-beta-3&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;initialize&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;create&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;com.wakaleo.schemaspy&lt;/groupId&gt; &lt;artifactId&gt;maven-schemaspy-plugin&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;configuration&gt; &lt;databaseType&gt;mysql&lt;/databaseType&gt; &lt;database&gt;${database.schema}&lt;/database&gt; &lt;host&gt;${database.host}&lt;/host&gt; &lt;user&gt;${database.user}&lt;/user&gt; &lt;password&gt;${database.pwd}&lt;/password&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>The problem is that when you execute directly a plugin goal, goals binded on the initialize phase (or validate) are not executed. So to generate schema spy we need to type:</p> <pre><code>$&gt; mvn org.codehaus.mojo:properties-maven-plugin:read-project-properties schemaspy:schemaspy </code></pre> <p>We want to tell that properties plugin and buildNumber plugin need to be executed for every maven command so we can type:</p> <pre><code>$&gt; mvn schemaspy:schemaspy </code></pre> <p>Is there a clean way to do that (without scripting) ?</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.
 

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