Note that there are some explanatory texts on larger screens.

plurals
  1. PODisable phases in Maven lifecycle
    text
    copied!<p>How can I disable unwanted phases in Maven 3 default lifecycle?</p> <p>By <em>disable</em> I mean completely, entirely cut the phase from the lifecycle, so that it is not even invoked.</p> <p>I might need a custom lifecycle but I could not find an easy way to define it straight in my <code>pom.xml</code>. It appears I need to <em>write a plugin</em> just to list phases I want.</p> <p>For example, I would like <code>default-testResources</code>, <code>default-testCompile</code> and <code>default-test</code> phases to never happen and turn my build log from this:</p> <pre><code>[INFO] ------------------------------------------------------------------------ [INFO] Building HelpDesk Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helpdesk --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory d:\proj\HelpDesk\repo\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ helpdesk --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ helpdesk --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ helpdesk --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ helpdesk --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-war-plugin:2.3:war (default-war) @ helpdesk --- [INFO] Packaging webapp [INFO] Assembling webapp [helpdesk] in [d:\proj\HelpDesk\repo\target\helpdesk] [INFO] Processing war project [INFO] Copying webapp resources [d:\proj\HelpDesk\repo\src\main\webapp] [INFO] Webapp assembled in [40 msecs] [INFO] Building war: d:\proj\HelpDesk\repo\target\helpdesk.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ </code></pre> <p>into this:</p> <pre><code>[INFO] ------------------------------------------------------------------------ [INFO] Building HelpDesk Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helpdesk --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory d:\proj\HelpDesk\repo\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ helpdesk --- [INFO] No sources to compile [INFO] [INFO] --- maven-war-plugin:2.3:war (default-war) @ helpdesk --- [INFO] Packaging webapp [INFO] Assembling webapp [helpdesk] in [d:\proj\HelpDesk\repo\target\helpdesk] [INFO] Processing war project [INFO] Copying webapp resources [d:\proj\HelpDesk\repo\src\main\webapp] [INFO] Webapp assembled in [40 msecs] [INFO] Building war: d:\proj\HelpDesk\repo\target\helpdesk.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ </code></pre>
 

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