-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String Index out of Range error #185
Comments
I believe this is an old bug that was fixed in the 2.4.8 release; however, because of issues #78 and #130, the maintainer of yuicompressor-maven-plugin has opted to continue depending on 2.4.7 for the time being. Without a test case of the problem against 2.4.8, there's not a lot I can do to help you out here. If you're able to get 2.4.8 into your environment, and recreate the problem, please feel free to reopen this issue, and thanks for your interest in improving the YUICompressor project! |
The below code produce an error java.lang.StringIndexOutOfBoundsException: String index out of rangeHtmlCompressor compressor = new HtmlCompressor(); compressor.setEnabled(true); //if false all compression is off (default is true)
|
My pom file is as below :-
org.apache.maven.plugins
maven-war-plugin
2.3
package
war
src/main/minified
UTF-8
false
src/main/minified
UTF-8
${project.build.directory}/min
net.alchim31.maven
yuicompressor-maven-plugin
1.5.1
compressyui
process-resources
compress
true
src/main/minified
${project.build.directory}/min
false
true
And when I do a maven clean and build in Netbeans I get the following output and failure.
Can anyone please help what's wrong here :-
This is the stacktrace --- [INFO] --- yuicompressor-maven-plugin:1.5.1:compress (compressyui) @ icoreWeb ---
[INFO] accountmgmt.css (28786b) -> accountmgmt.css (20283b)[70%]
[INFO] fields.css (10674b) -> fields.css (7808b)[73%]
[INFO] footer.css (5406b) -> footer.css (3790b)[70%]
[INFO] apex-popup.css (2789b) -> apex-popup.css (1985b)[71%]
[INFO] apex.css (65467b) -> apex.css (46778b)[71%]
[INFO] bookingDisclosure.css (683b) -> bookingDisclosure.css (505b)[73%]
[INFO] fields.css (9684b) -> fields.css (6622b)[68%]
[INFO] apex.css (6439b) -> apex.css (4899b)[76%]
[INFO] ie.css (7575b) -> ie.css (5137b)[67%]
[INFO] rwd.css (27039b) -> rwd.css (18406b)[68%]
[INFO] circle.css (457b) -> circle.css (288b)[63%]
[INFO] contentOne.css (1105b) -> contentOne.css (699b)[63%]
[INFO] contentOneHeader.css (56b) -> contentOneHeader.css (36b)[64%]
[INFO] disclosure.css (11116b) -> disclosure.css (8832b)[79%]
[INFO] footer.css (4983b) -> footer.css (3676b)[73%]
[INFO] hispanicFieldStyle.css (2663b) -> hispanicFieldStyle.css (1627b)[61%]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.225s
[INFO] Finished at: Fri Jan 02 09:11:12 EST 2015
[INFO] Final Memory: 26M/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: String index out of range: 76892 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: 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: String index out of range: 76892
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:60)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:354)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution compressyui of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: String index out of range: 76892
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 76892
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:879)
at java.lang.StringBuffer.substring(StringBuffer.java:416)
at com.yahoo.platform.yui.compressor.CssCompressor.compress(CssCompressor.java:125)
at net_alchim31_maven_yuicompressor.YuiCompressorMojo.compressCss(YuiCompressorMojo.java:259)
at net_alchim31_maven_yuicompressor.YuiCompressorMojo.processFile(YuiCompressorMojo.java:216)
at net_alchim31_maven_yuicompressor.MojoSupport.processDir(MojoSupport.java:216)
at net_alchim31_maven_yuicompressor.MojoSupport.execute(MojoSupport.java:151)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
is this a problem with the plugin? what can be the possible solution? I can't use any other plugin as those are not in our nexus repository. Please help me understand what is wromg here
The text was updated successfully, but these errors were encountered: