使用grails 2.4.1和插件joda-time 1.5编译错误

时间:2014-10-09 16:04:10

标签: grails jodatime

编译grails 2.4.1项目时出现以下错误:

[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] /home/omarques/ws1/sigob/target/work/plugins/joda-time-1.5/src/groovy/grails/plugin/jodatime/simpledatastore/SimpleMapJodaTimeMarshaller.groovy: 44: Apparent variable 'MonthDay' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
[groovyc] You attempted to reference a variable in the binding or an instance variable from a static context.
[groovyc] You misspelled a classname or statically imported field. Please check the spelling.
[groovyc] You attempted to use a method 'MonthDay' but left out brackets in a place not allowed by the grammar.
[groovyc]  @ line 44, column 87.
[groovyc]    me, LocalDate, LocalDateTime, MonthDay,
[groovyc]                                  ^ 

我尝试将项目升级到2.4.3并得到了同样的错误

2 个答案:

答案 0 :(得分:0)

将以下内容添加到application.properties并尝试

plugins.joda时间= 1.3.1

答案 1 :(得分:0)

通过在BuildConfig上包含对joda-time-2.3的显式依赖来解决问题,因为另一个依赖项(net.objectlab.kit:datecalc-joda:1.2.0)导致使用过时版本的joda-time这与joda-time grails插件不兼容