2013-03-24 51 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" 

它工作正常,但我不知道那么多细节。我的老板告诉了它。感谢我的老板。