2009/5/22 Stephen Connolly <stephen.alan.conno...@gmail.com> > OK, I just noticed this... > > If I have two mojo's annotated with different phases, i.e. > > /** > * @goal integration-test > * @requiresProject true > * @requiresDependencyResolution test > * @phase integration-test > */ > public class FailsafeMojo > extends AbstractMojo > { > ... > } > > and > > /** > * @goal verify > * @requiresProject true > * @requiresDependencyResolution test > * @phase verify > */ > public class VerifyMojo > extends AbstractMojo > { > ... > } > > > If I add to my pom.xml > > <project> > .. > <build> > .. > <plugins> > ... > <plugin> > <groupId>....</groupId> > <artifactId>....</artifactId> > <version>...</version> > ... > * <executions> > <execution> > <goals> > <goal>integration-test</goal> > <goal>verify</goal> > </goals> > </execution> > </executions> > * </plugin> > ... > </plugins> > ... > </build> > </project> > > Then the integration-test goal is bound to the integration-test phase and > the verify goal is bound to the verify phase. > > My question is this... is this a feature or a bug? > > It'd be nice if it was a feature... but I suspect it is a bug... > > Just to confirm for everyone... > > If I add > > <project> > .. > <build> > .. > <plugins> > ... > <plugin> > <groupId>....</groupId> > <artifactId>....</artifactId> > <version>...</version> > ... > * <executions> > <execution> > <phase>integration-test</phase> > <goals> > <goal>integration-test</goal> > <goal>verify</goal> > </goals> > </execution> > </executions> > * </plugin> > ... > </plugins> > ... > </build> > </project> > > Then both goals are bound to the integration-test phase, as I would expect > > -Stephen
<plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.16</version> <configuration> <stopPort>${integration-test-stop-port}</stopPort> <stopKey>STOP</stopKey> <contextPath>/</contextPath> </configuration> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <!-- stop any previous instance to free up the port --> <goal>stop</goal> <goal>run-exploded</goal> </goals> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> <daemon>true</daemon> </configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>@project.groupId@</groupId> <artifactId>@project.artifactId@</artifactId> <version>@project.version@</version> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> gives: ... [INFO] [INFO]* [jetty:run-exploded {execution: start-jetty}]* [INFO] [INFO] Configuring Jetty for project: run failing tests in jetty container [INFO] 2009-05-22 15:48:35.834::INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] [INFO] Context path = / [INFO] [INFO] Tmp directory = determined at runtime [INFO] [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml [INFO] [INFO] Web overrides = none [INFO] [INFO] Starting jetty 6.1.16 ... [INFO] 2009-05-22 15:48:35.906::INFO: jetty-6.1.16 [INFO] 2009-05-22 15:48:35.999::INFO: No Transaction manager found - if your webapp requires one, please configure one. [INFO] 2009-05-22 15:48:36.170::INFO: Started selectchannelconnec...@0.0.0.0:8080 [INFO] [INFO] Started Jetty Server [INFO] [INFO] *[failsafe:integration-test {execution: default}]* [INFO] [INFO] Failsafe report directory: /home/connollys/src/mojo-sandbox/failsafe-maven-plugin/target/it/jetty-war-test-failing/target/failsafe-reports [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running basic.BasicIT [INFO] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.896 sec <<< FAILURE! [INFO] [INFO] Results : [INFO] [INFO] Failed tests: [INFO] testSmokes(basic.BasicIT) [INFO] [INFO] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] *[jetty:stop {execution: stop-jetty}]* [INFO] [INFO] Stopping server 0 [INFO] [INFO]* [failsafe:verify {execution: default}]* [INFO] [INFO] Failsafe report directory: /home/connollys/src/mojo-sandbox/failsafe-maven-plugin/target/it/jetty-war-test-failing/target/failsafe-reports [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] There are test failures. [INFO]