2012-12-26 62 views
1

在Windows 7 64位系統上使用Grails 2.1.2時,在編譯時出現以下錯誤,請幫助我如何解決此問題。Grails 2.1.2 - 未解決的依賴關係錯誤

:::::::::::::::::::::::::::::::::::::::::::::: 

::   UNRESOLVED DEPENDENCIES   :: 

:::::::::::::::::::::::::::::::::::::::::::::: 

:: org.grails.plugins#mail;1.0-SNAPSHOT: not found 

:: org.grails.plugins#tomcat;1.3.2: not found 

:: org.grails.plugins#hibernate;1.3.2: not found 

:: org.grails.plugins#csl-rest-lib;1.0: not found 

:::::::::::::::::::::::::::::::::::::::::::::: 

回答

0

在BuildConfig.groovy,試圖聲明的依賴關係:

dependencies { 
    compile 'org.grails.plugins:mail:1-0-SNAPSHOT' 
    compile 'org.grails.plugins:tomcat:1.3.2' 
    ... 
} 
0

如果您的應用程序從Grails的1.3(< 2. )更新或Grails的2創建,您需要檢查插件版本grails plugins 例如,當前版本的郵件插件是1.0.1 mail plugin 而且您還需要在conf/BuildConfig.groovy中檢查此依賴關係。它必須有一部分是這樣的:

plugins { 
     build ":tomcat:$grailsVersion" 

     runtime ":hibernate:${grailsVersion}" 
     runtime ":resources:1.1.6" 
... 

plugins部分描述您的插件。 而你需要檢查最新的插件庫並描述它是這樣的:

dependencies { 
     // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. 

     compile('org.apache.poi:poi:3.7', 
       'org.apache.poi:poi-contrib:3.6', 
       'org.apache.poi:poi-ooxml:3.7', 
       'antlr:antlr:2.7.6', 
       'org.apache.ant:ant-apache-log4j:1.7.1' 
..