1、选择
org.apache.maven.archtypes:maven-archtype-webapp
2、禁止远程下载
archetypeCatalog=internal
目的是不远程下载,否则始终【downloading maven plugins...】
3、jetty
<build> <finalName>myprj</finalName> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.3.27.v20190418</version> <configuration> <httpConnector> <port>9999</port> </httpConnector> <scanIntervalSeconds>10</scanIntervalSeconds> <webAppConfig> <contextPath>/myprj</contextPath> </webAppConfig> </configuration> </plugin> </plugins> </build>
参见:https://www.cnblogs.com/yaoyuan2/p/10577785.html
最终目录结构: