我在使用带有 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>
2 回答
MMTTMM
TA贡献1869条经验 获得超4个赞
...
<packaging>war</packaging>
<name>test-project</name>
<properties>
<maven.compiler.source>JavaVersion</maven.compiler.source>
<maven.compiler.target>javaVersion</maven.compiler.target>
</properties>
....
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
添加回答
举报
0/150
提交
取消