Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 7.6.1
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
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
- is related to
-
JETTY-1516
Jetty mavn plugin run-forked doesn't respect configuration set using file from contextXml option
-
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