waffel’s Weblog

Februar 16, 2010

howto disable inherited maven plugin

Filed under: software — Thomas Wabner @ 3:43 nachmittags
Tags: , , , ,

We using in our department a big hierarchy of maven parents (like the apache community does). Some of these parents define useful plugins.

If I want to use the parents (and often this is a good idea, because the parents defining for example version informations for my dependencies), but I do not want to have a specific plugin invoked while I’am using maven, I can simple disable the plugin with follow configuration in my pom.xml:

...
<build>
  <plugins>
     <plugin>
        <artifactId>thePluginArtifact</artifactId>
        <groupId>thePluginGroup</groupId>
        <executions>
           <execution>
              <id>the-execution-id</id>
              <phase>none</phase>
           </execution>
        </executions>
     </plugin>
  </plugins>
</build>
...

The trick how to disable a plugin is to set the phase of the plugin to none.

The Rubric Theme. Erstelle eine kostenlose Website oder einen kostenlosen Blog – auf WordPress.com!.

Folgen

Erhalte jeden neuen Beitrag in deinen Posteingang.

Schließe dich 28 Followern an