2016-04-15 184 views
0

我想把這個插件集成到我的grails項目中。未能解決依賴關係。如何解決依賴性錯誤?

https://grails.org/plugin/facebook-graph

我在BuildConfig文件添加dependcny。

plugins { 
     runtime ":hibernate:$grailsVersion" 
     runtime ":jquery:1.8.3" 
     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" 

     runtime ":database-migration:1.2.1" 

     compile ':cache:1.0.1' 
     compile "org.grails.plugins:facebook-graph:0.14" 
    } 

當我運行應用程序時,出現以下錯誤。

| Loading Grails 2.2.0 
| Configuring classpath 
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information): 

- org.grails.plugins:facebook-graph:0.14 

看起來存儲庫沒找到?我怎樣才能找到這個插件的正確的存儲庫?我感謝任何幫助。謝謝!

更新:

我倉庫的定義如下:

repositories { 
     inherits true // Whether to inherit repository definitions from plugins 

     grailsPlugins() 
     grailsHome() 
     grailsCentral() 

     mavenLocal() 
     mavenCentral() 

     // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories 
     //mavenRepo "http://snapshots.repository.codehaus.org" 
     //mavenRepo "http://repository.codehaus.org" 
     //mavenRepo "http://download.java.net/maven/2/" 
     //mavenRepo "http://repository.jboss.com/maven2/" 
    } 
+0

發表您的'grails.project.dependency.resolution.repositories {}'關閉 – injecteer

+0

庫{ 繼承真//無論從繼承的插件庫定義 grailsPlugins() grailsHome() grailsCentral( ) mavenLocal() mavenCentral() //取消註釋這些(或添加新的),以使公共Maven倉庫 // mavenRepo 「http://snapshots.repository.codehaus.org」 遠程解決依賴//mavenRepo「http://repository.codehaus.org」 // mavenRepo「http://download.java.net/maven/2/」 // mavenRepo「http://repository.jboss.com/maven2/」 } – kofhearts

+0

更新您的答案,這是不可能讀爲評論... – injecteer

回答

1

compile ":facebook-graph:0.14"爲我工作。擺脫org.grails.plugins

+0

我仍然得到|加載Grails 2.2.0 |配置類路徑 |錯誤無法解析依賴關係(將日誌級別設置爲BuildConfig.groovy中的「警告」以獲取更多信息): - org.grails.plugins:臉譜圖:0.14 – kofhearts