我的 web.xml 中有 ${properties}
是根据配置文件过滤的。我想将 web.xml 与 jetty:run 的最终属性一起使用,但我还没有成功,它始终坚持其 web.xml 的默认路径,即 file:/home/---/项目/project/trunk/src/main/webapp/WEB-INF/web.xml
我试过:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.4.v20120524</version>
<configuration>
<webAppConfig>
<overrideDescriptor>target/project/WEB-INF/web.xml</overrideDescriptor>
</webAppConfig>
</configuration>
</plugin>
和
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.4.v20120524</version>
<configuration>
<overrideWebXml>target/project/WEB-INF/web.xml</overrideWebXml>
</configuration>
</plugin>
部分问题在于了解哪些配置与哪些版本相匹配,因为似乎没有人将其记录下来。此外,根据 eclipsepedia 上的文档,OverrideDescriptor 仅添加到 Web 上下文配置中。
最佳答案
根据 the documentation ,配置选项为webXml
。
关于jakarta-ee - 过滤时如何覆盖jetty-maven-plugin中的web.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12271187/