我刚刚下载了最新版本的 Datatables(1.9.4) jQuery 插件并尝试将其包含到我的 atlassian-jira5-gadget 中,但再次运行安装后,内部 YUI JavaScript 编译器抛出此错误:
[INFO] [jira:compress-resources {execution: virtual-execution}]
[INFO] Compiling javascript using YUI
[INFO] compressing to /Users/xyz/target/classes/datatable/js/jquery.dataTables.min-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/api/api.internal-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/api/api.methods-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/api/api.static-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/core/core.ajax-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/core/core.columns-min.js
[INFO] compressing to /Users/xyz/target/classes/datatable/src/core/core.constructor-min.js
[ERROR] invalid return
return;
[ERROR] invalid return
return DataTable.settings[i].oInstance;
[ERROR] invalid return
return;
[ERROR] Compilation produced 3 syntax errors.
[ERROR] Unable to complete running command: pi
java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:111)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:106)
at org.twdata.maven.cli.CliShell.interpretCommand(CliShell.java:42)
at org.twdata.maven.cli.CliShell.run(CliShell.java:27)
at org.twdata.maven.cli.AbstractCliMojo.displayShell(AbstractCliMojo.java:144)
at org.twdata.maven.cli.AbstractCliMojo.access$000(AbstractCliMojo.java:22)
at org.twdata.maven.cli.AbstractCliMojo$1.run(AbstractCliMojo.java:116)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.shaded.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:100)
at org.twdata.maven.cli.MojoCall.run(MojoCall.java:31)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.runMojo(ExecuteGoalCommand.java:125)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:108)
... 6 more
Caused by: org.mozilla.javascript.EvaluatorException: Compilation produced 3 syntax errors.
at com.atlassian.maven.plugins.amps.util.minifier.YUIErrorReporter.runtimeError(YUIErrorReporter.java:35)
at org.mozilla.javascript.Parser.parse(Parser.java:392)
at org.mozilla.javascript.Parser.parse(Parser.java:337)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.atlassian.maven.plugins.amps.util.minifier.ResourcesMinifier.yuiJsCompile(ResourcesMinifier.java:176)
at com.atlassian.maven.plugins.amps.util.minifier.ResourcesMinifier.processJs(ResourcesMinifier.java:112)
at com.atlassian.maven.plugins.amps.util.minifier.ResourcesMinifier.processResource(ResourcesMinifier.java:59)
at com.atlassian.maven.plugins.amps.util.minifier.ResourcesMinifier.minify(ResourcesMinifier.java:38)
at com.atlassian.maven.plugins.amps.MavenGoals.compressResources(MavenGoals.java:497)
at com.atlassian.maven.plugins.amps.CompressResourcesMojo.execute(CompressResourcesMojo.java:33)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
at org.shaded.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:98)
... 9 more
我已经包含了 jquery.colorpicker 和 Flexigrid,没有任何这些错误。他们运行良好。所以我认为这个错误可能属于 DataTables 但我不确定......
有任何想法吗?