我正在尝试在本地运行spring mvc项目。我正在使用Jetty Maven插件。
foo=
和
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp</artifactId>
<version>${jetty.version}</version>
</dependency>
错误:
<jetty.version>9.1.4.v20140401</jetty.version>
我进行了很多搜索,并尝试将asm依赖项添加到码头插件中:
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:970)
at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:953)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:906)
... 6 more
java.lang.RuntimeException: Error scanning entry com/sun/tools/javadoc/ModifierFilter.class from jar file:/usr/local/jdk1.8.0_131/jre/../lib/tools.jar
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:910)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:828)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:542)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
at java.lang.Thread.run(Thread.java:748)
C
一些帖子提到这可能是码头插件版本问题。所以我尝试了9.2.12.v20150709和9.3.25.v20180904。
但是加载页面时我遇到了另一个问题:
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
</dependencies>