On 2017-10-15T17:02:19 +0000 Mark Raynsford <[email protected]> wrote: > > Er, to clarify, I mean that I'd like to execute a new plugin entirely, > not just a different version of the maven-site-plugin. I realized after > I sent the message that it could be interpreted more than one way...
Managed to answer my own question. It turns out that I want to disable
an existing binding of a plugin to a lifecycle phase, and then run my
own plugin after that. As an example:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
<executions>
<execution>
<id>default-site</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>default-site</id>
<goals>
<goal>clean</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
This would disable the execution of the maven-site-plugin by setting
phase to "none", and then run the maven-clean-plugin instead. I just
use the maven-clean-plugin as an example, it'd obviously work with any
other plugin.
--
Mark Raynsford | http://www.io7m.com
pgpEfyTTmDVmR.pgp
Description: OpenPGP digital signature
