抱歉,Grails新手。我正在看一个项目,它的测试代码中有一些对JUnit的引用。我正在尝试弄清楚JUnit是如何添加到类路径中的。我转到BuildConfig.groovy文件,没有看到对JUnit的显式引用。
依赖关系是:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
test "org.spockframework:spock-grails-support:0.7-groovy-2.0"
runtime 'postgresql:postgresql:9.0-801.jdbc4'
compile 'com.thoughtworks.xstream:xstream:1.4.2'
compile 'spy:spymemcached:2.8.9'
compile "org.grails:grails-webflow:$grailsVersion"
compile 'org.infinispan:infinispan-core:5.1.0.CR2'
}插件依赖项为:
plugins {
test(":spock:0.7") {
exclude "spock-grails-support"
}
runtime ":jquery:1.7.2"
runtime ":resources:1.1.6"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.4"
build ":tomcat:$grailsVersion"
compile ":geoip:0.2"
compile ':cache:1.0.0'
compile ":quartz:1.0-RC9"
//compile ":quartz-monitor:0.3-RC2"
compile ":grails-melody:1.45"
compile ':webflow:2.0.0', {
exclude 'grails-webflow'
}
}那么,对于Junit jar中可能引入的是什么或者我如何找出它是什么,有什么想法吗?
谢谢。
发布于 2013-07-28 07:34:08
默认情况下,JUnit是grails包的一部分。中从grails.org下载的grails包的lib中应该可以找到junit jar。
GRAILS_HOME\lib\junit\junit\jars
您还可以通过在项目上运行grails dependency-report并在测试范围中查找junit jar来验证如何将其添加到项目中。
Grails 2.2.3附带的最新版本的junit是junit-4.10。
https://stackoverflow.com/questions/17903485
复制相似问题