gpt4 book ai didi

maven-jetty-plugin - 使用 Maven Jetty 插件设置 "root"上下文路径

转载 作者:行者123 更新时间:2023-12-03 11:44:49 27 4
gpt4 key购买 nike

我有以下 Maven 代码片段

<plugin>
<!-- http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin -->
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.16</version>
<configuration>
<contextPath>/thomas</contextPath>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
</configuration>
</plugin>

我想将上下文路径设置为“/”,但 Jetty 插件不尊重它,上下文回退到使用文件夹(或者可能是模块)名称作为上下文路径。如果我使用名称设置上下文路径,例如:
 <contextPath>/thomas</contextPath>

有什么建议么?

提前致谢。

最佳答案

FWIW 这就是你需要的 jetty 8

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.7.v20120910</version>
<configuration>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
</plugin>

关于maven-jetty-plugin - 使用 Maven Jetty 插件设置 "root"上下文路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8685970/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com