java为什么gradle jettyRunWar任务不能与java8一起工作?
使用:Gradle2.0、SpringMVC4.0.6、Java8
我有下一个{
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'idea'
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5'
compile 'org.springframework:spring-webmvc:4.0.6.RELEASE'
runtime 'javax.servlet:jstl:1.1.2'
}
jettyRun.contextPath = ''
jettyRunWar.contextPath = ''
当我运行时jettyRun
应用程序运行良好。
但是当我运行jettyRunWar
时,我遇到了下一个错误:
org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
任务之间的区别是什么?为什么第二个任务不起作用
# 1 楼答案
确保在Java8中使用
asm
5.0.1或更高版本仔细检查您的可传递依赖项,并确保覆盖
asm
库的使用,使其为较新版本这可能是你需要的