【发布时间】:2015-12-22 12:37:06
【问题描述】:
我已经 gradle 构建文件:
task hibernateInstrumentation {
ant.taskdef(name: 'hibernateInstrumentation' ,
classpath: project.sourceSets.main.compileClasspath.asPath,
classname: 'org.hibernate.tool.instrument.javassist.InstrumentTask'){
}
ant.hibernateInstrumentation(verbose: 'true') {
fileset(
dir: "${project.buildDir}",
inculde: 'mypackage/model/*.class'
)
}
}
compileJava.doLast {
hibernateInstrumentation
}
dependencies {
compile "org.hibernate:hibernate-core:$hibernateVersion",
compile 'org.javassist:javassist:3.18.1-GA',
// ...
}
但是当我开始 gradle 时
- 出了什么问题:
评估项目“:应用程序”时出现问题。
taskdef 类 org.hibernate.tool.instrument.javassist.InstrumentTask 找不到 使用类加载器 AntClassLoader[]
project.sourceSets.main.compileClasspath.asPath)
【问题讨论】: