Jetty
  1. Jetty
  2. JETTY-1365

jetty-maven-plugin executes lifecycle phases twice, when run as a build plugin in project pom.xml

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 7.2.2
    • Fix Version/s: 7.5.0
    • Component/s: Maven
    • Labels:
      None
    • Environment:
      maven-jetty-plugin 7.2.2.v20101205 on maven 2.2.1
    • Number of attachments :
      0

      Description

      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-exploded 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 goal which
      would delegate 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 for backwards compatibility, such as
      with the maven-compiler-plugin. There is no workaround - the previous lifecycle
      phases are either executed twice, or not at all.

      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

      ref: https://bugs.eclipse.org/bugs/show_bug.cgi?id=342643

        Activity

        Hide
        Michael Gorovoy added a comment -

        Unfortunately I did not notice this bug earlier, please see JETTY-1405 for my reply.

        Show
        Michael Gorovoy added a comment - Unfortunately I did not notice this bug earlier, please see JETTY-1405 for my reply.

          People

          • Assignee:
            Michael Gorovoy
            Reporter:
            Bob Fields
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: