Jetty
  1. Jetty
  2. JETTY-1494

jetty:run-forked does not honor <webApp> configuration

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 7.6.1
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When specifying a configuration for jetty:run-forked of

      <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${project.version}</version>
          <configuration>
              <stopPort>8888</stopPort>
              <stopKey>quit</stopKey>
              <webApp>
                  <contextPath>/</contextPath>
              </webApp>
          </configuration>
      </plugin>
      

      the <contextPath> is not honored.

      The configuration only works with <contextPath> is put outside of <webApp>.

      I believe also other settings within <webApp> are not honored, but <contextPath> is immediately visible and testable.

        Issue Links

          Activity

          Hide
          Jan Bartel added a comment -

          Simone,

          Yes, this is clearly stated in the docs here:
          http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#jetty:run-forked__:__Running_an_unassembled_webapp_in_a_separate_jvm

          The reason is that the <webApp> you are configuring is the WebAppContext instance that belongs to the plugin, not that of the WebAppContext created by the forked jvm.

          Transfering the config of the <webApp> instance in the pom to the instance in the forked jvm is not trivial, so I decided that we would only expose some configuration options for it, and see how that suits users who want a forked execution. Most users who want a forked execution don't also want to use it non-forked, so I don't believe that the pom is cluttered with 2 different configs, although I welcome feedback on that.

          I'm changing this to an enhancement request and if there's enough interest we can try and figure out a reasonable way of transferring the <webApp> to the forked jvm.

          cheers
          Jan

          Show
          Jan Bartel added a comment - Simone, Yes, this is clearly stated in the docs here: http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#jetty:run-forked__:__Running_an_unassembled_webapp_in_a_separate_jvm The reason is that the <webApp> you are configuring is the WebAppContext instance that belongs to the plugin, not that of the WebAppContext created by the forked jvm. Transfering the config of the <webApp> instance in the pom to the instance in the forked jvm is not trivial, so I decided that we would only expose some configuration options for it, and see how that suits users who want a forked execution. Most users who want a forked execution don't also want to use it non-forked, so I don't believe that the pom is cluttered with 2 different configs, although I welcome feedback on that. I'm changing this to an enhancement request and if there's enough interest we can try and figure out a reasonable way of transferring the <webApp> to the forked jvm. cheers Jan
          Jan Bartel made changes -
          Field Original Value New Value
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          Jan Bartel made changes -
          Link This issue is related to JETTY-1516 [ JETTY-1516 ]
          Hide
          Jan Bartel added a comment -

          Agreed it would be desirable, but any solution seems too fragile to bother with. This behaviour is documented as mentioned previously. Closing this issue for now. Reopen if you think of an elegant way to handle this.

          Jan

          Show
          Jan Bartel added a comment - Agreed it would be desirable, but any solution seems too fragile to bother with. This behaviour is documented as mentioned previously. Closing this issue for now. Reopen if you think of an elegant way to handle this. Jan
          Jan Bartel made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]

            People

            • Assignee:
              Jan Bartel
              Reporter:
              Simone Bordet
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: