Open crajarshi opened 9 years ago
If the syntax is invalid, yuicompressor can't parse it and compress it.
i use angularjs but is same problem how to fix it?
+1
+1
yeah I'm seeing similar behavior when trying to use the plugin. In my case its javascript I know works and has been used for a while. The javascript though has been generated using Typescript. Not sure if that could be the potential issue. @Ive4 is this what you are seeing as well in the case of the javascript generated from Angular Typescript?
ditto
+1
Any headway on this?
[INFO] --- yuicompressor-maven-plugin:1.5.1:compress (compressyui) @ icoreWeb --- [INFO] account_mgmt.js (120626b) -> account_mgmt.js (92930b)[77%] [INFO] app_progressBar.js (1467b) -> app_progressBar.js (1278b)[87%] [INFO] autoTabShiftTab.js (3578b) -> autoTabShiftTab.js (1385b)[38%] [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [804:12]: missing variable name [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 804:column 12:missing variable name var char; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [806:11]: identifier is a reserved word [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 806:column 11:identifier is a reserved word char = strData.charAt(i); [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [807:35]: identifier is a reserved word [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 807:column 35:identifier is a reserved word if(allowedChars.indexOf(char) == -1){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [808:21]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 808:column 21:syntax error isNumber = false; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [812:10]: invalid return [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 812:column 10:invalid return return isNumber; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [813:1]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 813:column 1:syntax error } [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [818:12]: missing variable name [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 818:column 12:missing variable name var char; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [820:11]: identifier is a reserved word [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 820:column 11:identifier is a reserved word char = strData.charAt(i); [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [821:35]: identifier is a reserved word [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 821:column 35:identifier is a reserved word if(allowedChars.indexOf(char) == -1){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [822:21]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 822:column 21:syntax error isNumber = false; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [826:10]: invalid return [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 826:column 10:invalid return return isNumber; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [827:1]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 827:column 1:syntax error } [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [829:30]: missing ; before statement [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 829:column 30:missing ; before statement function getDisplayStatus(id){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [838:8]: invalid return [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 838:column 8:invalid return return curDisplay; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [839:1]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 839:column 1:syntax error } [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [840:39]: missing ; before statement [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 840:column 39:missing ; before statement function showTxAmtLessThanFiftyError(){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [841:89]: missing ; before statement [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 841:column 89:missing ; before statement if(null != document.getElementById("applicationForm:sbTellUsYourself:ErrorTxMinFifty")){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [842:11]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 842:column 11:syntax error document.getElementById("applicationForm:sbTellUsYourself:ErrorTxMinFifty").style.display="block"; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [843:2]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 843:column 2:syntax error } [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [844:103]: missing ; before statement [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 844:column 103:missing ; before statement if(null != document.getElementById("applicationForm:sbIcoreValidationErrorMessages:ErrorTxMinFifty")){ [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [845:11]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 845:column 11:syntax error document.getElementById("applicationForm:sbIcoreValidationErrorMessages:ErrorTxMinFifty").style.display="block"; [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [846:2]: syntax error [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 846:column 2:syntax error } [ERROR] C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js [1:0]: Compilation produced 22 syntax errors. [ERROR] ...C:\Icore\icoreApp\maven.1420039858792\icoreApp\icoreWeb\src\main\minified\js\balance_transfer.js:line 1:column 0:Compilation produced 22 syntax errors. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.590s [INFO] Finished at: Wed Dec 31 12:00:00 EST 2014 [INFO] Final Memory: 35M/64M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (compressyui) on project icoreWeb: Execution compressyui of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: Compilation produced 22 syntax errors. -> [Help 1] [ERROR]
How Can I turn this feature off in Yui-Compressor Maven plugin?
My Configuration is as below