Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to bind maven antrun plugin to the clean phase
    primarykey
    data
    text
    <p>I have just translated an ant project into maven however since maven does not really deal with deployment I introduce some antrun into the build. However when I try to execute it the plugin skips my tasks. for exemple when I run mvn clean antrun:run I get the following message: No ant target defined - SKIPPED. the same happends to the second phase in which I am trying to override the deployment phase to do an actual deploy rather to upload to a repository. </p> <p>Please find below an extract of my pom.xml (type:pom):</p> <pre><code> &lt;plugin&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;version&gt;1.6&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;clean&lt;/id&gt; &lt;configuration&gt; &lt;task&gt; &lt;echo&gt;Cleaning deployed website&lt;/echo&gt; &lt;/task&gt; &lt;tasks&gt; &lt;delete dir="${deployRoot}/mydir/${env}"/&gt; &lt;/tasks&gt; &lt;/configuration&gt; &lt;phase&gt;clean&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;deployment&lt;/id&gt; &lt;configuration&gt; &lt;task&gt; &lt;echo&gt;Deploying website&lt;/echo&gt; &lt;/task&gt; &lt;tasks&gt; &lt;echo&gt;Copying website artifact to deployment &lt;/echo&gt; &lt;mkdir dir="${deployRoot}/mydir/${env}" /&gt; &lt;unzip src="${project.basedir}/target/${env}.${project.version}.zip" dest="${deployRoot}/mydir/${env}" /&gt; &lt;chmod perm="ugo+rx"&gt; &lt;fileset dir="${deployRoot}/mydir/${env}/web-exploded/bin"&gt; &lt;include name="**/*.sh" /&gt; &lt;include name="**/*.bat" /&gt; &lt;/fileset&gt; &lt;/chmod&gt; &lt;/tasks&gt; &lt;/configuration&gt; &lt;phase&gt;deploy&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&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.
    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