2013-07-27 53 views
0

對不起這裏的Grails noob。 我正在看一個在其測試代碼中對JUnit有一些引用的項目。我想弄清楚JUnit如何被添加到類路徑中。我去了BuildConfig.groovy文件,我沒有看到明確的引用JUnit。對被設置的jar文件的依賴關係在哪裏?

的依賴關係是:

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罐子被把想法或如何我會找出它是什麼呢?

謝謝。

回答

3

默認情況下,JUnit是grails包裝的一部分。您應該能夠找到的Grails捆綁的lib JUnit的罐子,你會從grails.org在

GRAILS_HOME\lib\junit\junit\jars

通過運行該項目grails dependency-report下載,您也可以驗證它是如何添加到項目和在測試範圍內尋找junit jar。

與Grails 2.2.3一起發佈的最新版本的junit是junit-4.10