我正在尝试配置项目的 pom.xml 文件。我希望它在测试阶段启动 Jetty 服务器。为了做到这一点,我应该将“daemon”元素添加到 Jetty 插件中,如下所示,但 IntelliJ 警告我“此处不允许使用 Element daemon”。你能帮我么?是什么原因?
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.11.v20150529</version>
<configuration>
<httpConnector>
<port>8083</port>
</httpConnector>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
这实际上是 IntelliJ Idea 的一个错误。它有时无法正确识别某些配置属性。该插件确实具有此属性,因此您除了忽略 IDE 中的错误之外别无选择。该插件将按预期工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)