微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – 这里不允许使用Maven Jetty插件守护进程元素

我正在尝试配置项目的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>

解决方法

这实际上是IntelliJ Idea的错误.它有时无法正确识别某些配置属性.该插件确实具有此属性,因此除了忽略IDE中的错误之外,您没有其他选择.该插件将按预期工作.

原文地址:https://www.jb51.cc/java/120716.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐