我正在通过maven pom.xml在Java项目中使用minify-maven-plugin。为了消除错误,例如:
[ERROR] Failed to execute goal com.samaxes.maven:minify-maven-plugin:1.7.4:minify (default-minify)
on project webportal-impl: org.mozilla.javascript.EvaluatorException: Parse error.
IE8 (and below) will parse trailing commas in array and object literals incorrectly.
If you are targeting newer versions of JS, set the appropriate language_in option. -> [Help 1]
我希望我可以在数组或对象定义的最后一个条目中添加逗号。所以我想在我的Maven配置中禁用此检查。为此,我在pom.xml文件中添加了以下内容:
<artifactId>minify-maven-plugin</artifactId>
<version>1.7.4</version>
<executions>
<execution>
<id>default-minify</id>
<configuration>
<closureCompilationLevel>SIMPLE_OPTIMIZATIONS</closureCompilationLevel>
<closureLanguageIn>ECMASCRIPT6</closureLanguageIn>
<closureWarningLevels>OFF</closureWarningLevels>
<charset>UTF-8</charset>
...
但是它没有帮助,仍然是相同的错误。我该怎么办?
谢谢。