Search code examples
javascriptgrailsckeditorgrails-plugin

Grails ui-performance plugin not working with CKEditor


I installed Grails ui-performance plugin and made the necessary changes in the code. It didn't seem to work for development, I was getting files which name was ending with "_vnull" so I disabled it for development and tried to test with a WAR file. However, when generating the WAR file I get the following error and exception:

[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.

Is this some conflict with the CKEditor plugin? Any idea how to fix it?

Thanks for your help!


Solution

  • I fixed this issue by adding an exclusion for the plugins directory:

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

    As suggested in this nabble post