【问题标题】:missing dependencies - Grails缺少依赖项 - Grails
【发布时间】:2013-03-24 13:41:29
【问题描述】:

我遇到这样的错误

| 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]

我正在使用 格里亚尔 2.1.4 添加插件后 缓存 1.0.1 缓存听者 -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) 应用程序并添加了相同的插件。它运行良好。

我的示例应用程序:

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

谢谢

【问题讨论】:

    标签: grails grails-plugin grails-2.1


    【解决方案1】:

    在第一个应用程序中,错误似乎与缺少日志插件有关:

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

    在工作应用程序中,您正在使用日志记录 2.1.4:

    INSTALLED PLUGINS
    logging - 2.1.4
    

    【讨论】:

    • 我的应用程序在 2.0.4 中实现,我正在尝试迁移到 Grails 2.1.4 所以,我尝试了示例 grails 应用程序,它(缓存头)在那里工作。但在我的应用程序中不起作用。我的感受,有些前向兼容性不起作用。
    • 日志插件是否在您的 application.properties 文件中定义?这似乎是缺少的依赖项
    【解决方案2】:

    我解决了,

     commented this line in BuildConfig.groovy
    
       //excludes   "grails-plugin-log4j"
    

    它工作正常,但我不知道很多细节。我的老板建议了。感谢我的老板。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-16
      • 2017-12-25
      • 2015-04-18
      • 2020-03-24
      • 2012-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多