【发布时间】:2017-03-31 17:06:10
【问题描述】:
我需要配置从 maven cargo 插件运行的 jetty 以将其指向静态内容,我查看了 jetty 文档,但我看不到当它作为货物的一部分运行时如何将配置应用于 jetty。我想配置 webApp 部分并将资源库设置为作为此构建模块构建的我的 Angular 应用程序:
<execution>
<id>start jetty - angular webapp</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<container>
<containerId>jetty7x</containerId>
<type>embedded</type>
</container>
<webApp>
<resourceBases>
<contextPath>/</contextPath>
<resourceBase>../calculator-web/dist</resourceBase>
</resourceBases>
</webApp>
<configuration>
<properties>
<cargo.servlet.port>11000</cargo.servlet.port>
</properties>
</configuration>
</configuration>
</execution>
Jetty 启动,但它似乎忽略了这个配置,我的 index.html 文件只得到了 404。
有人能指点我正确的方向吗?
【问题讨论】: