Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342643 - jetty-maven-plugin executes lifecycle phases twice, as part of a pom.xml build
Summary: jetty-maven-plugin executes lifecycle phases twice, as part of a pom.xml build
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Jetty
Classification: RT
Component: other (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Jesse McConnell CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 17:21 EDT by Bob Fields CLA
Modified: 2011-07-27 16:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Fields CLA 2011-04-12 17:21:26 EDT
Build Identifier: maven-jetty-plugin 7.2.2.v20101205 on maven 2.2.1, not using Eclipse

When running maven-jetty-plugin as a plugin in a project pom.xml for an integration test, all phases through test-compile are run twice because the lifecycle is forked for the run, run-war, run-exploaded and deploy-war goals. At best this is annoying, at worst this can result in duplicate generated key values or buildId or other failures. As with source and many many other maven plugins, a separate goal such as run-no-fork could be provided for each which is delegates to the current goal except that the lifecycle phase is not invoked as part of the execution, i.e. like http://maven.apache.org/plugins/maven-source-plugin/test-jar-no-fork-mojo.html. Or provide a configuration value with <fork>true</fork> as the default, such as with the maven-compiler-plugin. There is no workaround - the previous lifecycle phases are either executed twice, or not at all.

Reproducible: Always

Steps to Reproduce:
1. pom.xml which invokes jetty:run, i.e. as shown in http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin
2. Run pom.xml. compile, resources phases are executed twice
3. See http://stackoverflow.com/questions/4526773/maven-jetty-plugin-question for a specific configuration example
Comment 1 Michael Gorovoy CLA 2011-07-27 16:52:34 EDT
This ticket has been moved to JIRA http://jira.codehaus.org/browse/JETTY-1405