我在使用带有 Java 11 的 jetty-maven-plugin 时遇到了问题。我尝试在插件依赖项中明确指定与 Java 11 兼容的 asm 版本。
我的配置:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.12.v20180830</version>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>6.2.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2.1</version>
</dependency>
</dependencies>
<configuration>
<httpConnector>
<port>9090</port>
</httpConnector>
<stopPort>8005</stopPort>
<stopKey>STOP</stopKey>
<webApp>
<contextPath>/</contextPath>
</webApp>
<jvmArgs>-Dfile.encoding=UTF-8</jvmArgs>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
MMTTMM
相关分类