52037317 发表于 2017-3-1 12:13:03

maven jetty 配置

  对于jdk8增加如下配置:



<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.0.M2</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<webApp>
<contextPath>/test</contextPath>
</webApp>
</configuration>
</plugin>
  jdk8因为版本问题可能在jetty启动时出现 java.lang.ArrayIndexOutOfBoundsException异常,可使用上面配置解决。
  jdk8以下版本增加



<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<webApp>
<contextPath>/test</contextPath>
</webApp>
</configuration>
</plugin>
  启动 jetty:run
页: [1]
查看完整版本: maven jetty 配置