2013-03-24 36 views
0

我得到這樣缺少的依存關係 - Grails的

| Loading Grails 2.1.4 
| Configuring classpath. 
| Environment set to development..... 
| Packaging Grails application..... 
| Compiling 2 source files..... 
| Error Error: The following plugins failed to load due to missing dependencies: [cacheHeaders] 
- Plugin: cacheHeaders 
    - Dependencies: 
     - controllers (Required: 1.1 > *, Found: 2.1.4) 
     ! logging (Required: 1.1 > *, Found: Not Installed) [INVALID] 

錯誤我使用 Grials 2.1.4 添加插件 緩存1.0.1 緩存hearders -1.5.1 我收到後以上錯誤。

在Grails文檔中,它表示這些也將支持Grails 2.1。 Grails版本:1.2> * - 我明白這個意思是,它也支持到2.1.4。 請參考:http://grails.org/plugins/search?q=cache-headers

else could you please refer any references to do "**cached-resourses in 2.1.4**". 

,但我沒有一個樣品的Grails(2.1.4)應用程序,並添加相同的插件。它運行完美。

我SampleApplication:

APPLICATION STATUS 
App version: 0.1 
Grails version: 2.1.4 
Groovy version: 1.8.8 
JVM version: 1.7.0_15 
Reloading active: true 
Controllers: 1 
Domains: 0 
Services: 3 
Tag Libraries: 13 

INSTALLED PLUGINS 
logging - 2.1.4 
core - 2.1.4 
codecs - 2.1.4 
i18n - 2.1.4 
urlMappings - 2.1.4 
dataSource - 2.1.4 
controllers - 2.1.4 
servlets - 2.1.4 
mavenPublisher - 0.8.1 
resources - 1.1.6 
webxml - 1.4.1 
databaseMigration - 1.3.2 
cacheHeaders - 1.1.5 
jquery - 1.8.3 
tomcat - 2.1.4 
groovyPages - 2.1.4 
domainClass - 2.1.4 
filters - 2.1.4 
converters - 2.1.4 
mimeTypes - 2.1.4 
scaffolding - 2.1.4 
hibernate - 2.1.4 
validation - 2.1.4 
services - 2.1.4 
cache - 1.0.1 

感謝

回答

0

它看起來像在第一應用中的錯誤是關於丟失日誌插件:

! logging (Required: 1.1 > *, Found: Not Installed) [INVALID] 

而在工作的應用程序,你是使用日誌記錄2.1.4:

INSTALLED PLUGINS 
logging - 2.1.4 
+0

我的應用程序在2.0.4中實現,我試圖遷移到Grails 2.1.4所以,我試着用示例grails應用程序,它(緩存頭)在那裏工作。但在我的應用程序不工作。我感覺,有些地方向前兼容性不起作用。 – Kumar 2013-03-24 16:22:48

+0

日誌插件是否在你的application.properties文件中定義?這似乎是缺失的依賴 – 2013-03-24 20:04:53

0

我解決它,

commented this line in BuildConfig.groovy 

    //excludes "grails-plugin-log4j" 

它工作正常,但我不知道那麼多細節。我的老闆告訴了它。感謝我的老闆。