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
goalintegration-test/goal
goalverify/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
phaseintegration-test/phase
goals
goalintegration-test/goal
goalverify/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
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
version6.1.16/version
configuration
stopPort${integration-test-stop-port}/stopPort
stopKeySTOP/stopKey
contextPath//contextPath
/configuration
executions
execution
idstart-jetty/id
phasepre-integration-test/phase
goals
!-- stop any previous instance to free up the port --
goalstop/goal
goalrun-exploded/goal
/goals
configuration
scanIntervalSeconds0/scanIntervalSeconds
daemontrue/daemon
/configuration
/execution
execution
idstop-jetty/id
phasepost-integration-test/phase
goals
goalstop/goal
/goals
/execution
/executions
/plugin
plugin
groupId@project.groupId@/groupId
artifactId@project.artifactId@/artifactId
version@project.version@/version
executions
execution
goals
goalintegration-test/goal
goalverify/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]