【发布时间】:2016-05-01 23:17:41
【问题描述】:
我正在尝试配置项目的 pom.xml 文件。我希望它在测试阶段启动 Jetty 服务器。为了做到这一点,我应该像下面那样将“守护程序”元素添加到 Jetty 插件,但 IntelliJ 警告我“此处不允许使用元素守护程序”。你能帮我么?是什么原因?
<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>
【问题讨论】:
标签: java maven intellij-idea jetty maven-jetty-plugin