简体   繁体   English

为什么Jetty 9不尊重finalName?

[英]Why Jetty 9 doesn't respect finalName?

I am using Maven with Jetty Plugin, but my projects lost their finalName in the URL. 我将Maven与Jetty插件一起使用,但是我的项目在URL中丢失了finalName。 They used to be like localhost:8080/projectname and now they are only localhost:8080. 它们以前就像localhost:8080 / projectname,现在只是localhost:8080。 Is there a way to force Jetty to use the finalName? 有没有一种方法可以强制Jetty使用finalName?

Maven's <project>/<build>/<finalName> and your Jetty contextPath are completely unrelated when it comes to the jetty-maven-plugin. 当涉及到jetty-maven-plugin时,Maven的<project>/<build>/<finalName>与您的Jetty contextPath完全无关。

The contextPath for jetty-maven-plugin defaults to / . jetty-maven-plugin的contextPath默认为/

You'll want to configure your webapp per the instructions for the jetty-maven-plugin, with a focus on the <contextPath> element in your plugin <configuration> . 您需要按照jetty-maven-plugin的说明配置Webapp ,重点是插件<configuration><contextPath>元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM