Grails ui-performance插件不能与CKEditor一起使用

时间:2011-02-07 22:10:31

标签: javascript grails ckeditor grails-plugin

我安装了Grails ui-performance插件并在代码中进行了必要的更改。它似乎不适用于开发,我得到的文件名称以“_vnull”结尾,因此我禁用它进行开发并尝试使用WAR文件进行测试。但是,在生成WAR文件时,我收到以下错误和异常:

[ERROR] 1:0:Compilation produced 55 syntax errors. in lineSource: null sourceName: null

ERROR: problem minifying /Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js: Compilation produced 55 syntax errors.

org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.
    at com.studentsonly.grails.plugins.uiperformance.JsErrorReporter.runtimeError(JsErrorReporter.groovy:35)
    at org.mozilla.javascript.Parser.parse(Parser.java:410)
    at org.mozilla.javascript.Parser.parse(Parser.java:355)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionAndMinifyJs(ResourceVersionHelper.groovy:230)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionAndMinifyJs(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionAndMinifyJs.callCurrent(Unknown Source)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.applyVersion(ResourceVersionHelper.groovy:158)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$applyVersion(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$_versionResources_closure1.doCall(ResourceVersionHelper.groovy:101)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionResources(ResourceVersionHelper.groovy:91)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionResources(ResourceVersionHelper.groovy)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionResources.callCurrent(Unknown Source)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.version(ResourceVersionHelper.groovy:44)
    at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$version.call(Unknown Source)
    at _Events.versionResources(_Events.groovy:36)
    at _Events$_run_closure2.doCall(_Events.groovy:16)
    at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:58)
    at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy)
    at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:327)
    at War$_run_closure1.doCall(War.groovy:38)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script War: org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.

这与CKEditor插件有些冲突吗?知道怎么解决吗?

感谢您的帮助!

1 个答案:

答案 0 :(得分:3)

我通过添加插件目录的排除来修复此问题:

uiperformance.exclusions = [ 
        "**/plugins/**"
]

正如this nabble post

中所述