尝试将jquery DataTable包含到Jira小工具时出错

时间:2013-07-03 11:35:17

标签: jquery datatables syntax-error jira jira-plugin

我刚下载了最新版本的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,但我不确定......

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

答案在这里:http://datatables.net/forums/discussion/16292/solvederror-invalid-return-return-datatable.settingsi.oinstance#Item_3

现在我可以对小工具中的数据表感到疯狂,是的!