jetty-maven-plugin, jetty maven plugin

maven plugin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.4.33.v20201020</version>
    <configuration>
        <stopKey>stop</stopKey>
        <stopPort>5599</stopPort>
        <webApp>
            <!-- <contextPath>/app0</contextPath> -->
            <contextPath>/</contextPath>
            <defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
        </webApp>
        <scanIntervalSeconds>2</scanIntervalSeconds>

        [httpConnector](httpConnector)
            <port>8080</port>
        </httpConnector>
    </configuration>
</plugin>

webdefault.xml

可以去maven的本地仓库找到

.m2\repository\org\eclipse\jetty\jetty-webapp\9.4.20.v20190813

解压后在这里可以找到webdefault.xml

jetty-webapp-9.4.20.v20190813\org\eclipse\jetty\webapp

run

1
2
3
mvn jetty:run
mvnDebug jetty:run
# 默认调试端口8000

debug - mvnDebug

https://blog.wiloon.com/?p=15212

mvnDebug -suspend默认为n,

https://www.eclipse.org/jetty/documentation/jetty-11/programming-guide/index.html#jetty-maven-plugin

http://www.blogjava.net/fancydeepin/archive/2015/06/23/maven-jetty-plugin.html

https://my.oschina.net/jackieyeah/blog/524556

https://stackoverflow.com/questions/7875002/setting-debug-configuration-for-mavenjettyeclipse