Java – Maven jetty plug-in daemon elements are not allowed here

I'm trying to configure the project's POM XML file I want it to start the jetty server during the test phase To do this, I should add a "daemon" element to the jetty plug-in, as I did below, but IntelliJ warned me that "element daemons are not allowed here" Can you help me? Why?

<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>

Solution

This is actually an error of IntelliJ idea It sometimes fails to recognize certain configuration properties correctly The plug-in does have this property, so you have no choice but to ignore errors in the IDE The plug - in will work as expected

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>