davidB / yuicompressor-maven-plugin

maven's plugin to compress (Minify / Ofuscate / Aggregate) Javascript files and CSS files using YUI Compressor
http://davidb.github.io/yuicompressor-maven-plugin/
GNU Lesser General Public License v2.1
122 stars 48 forks source link

Maven Yui Compressor Plugin :String Index out of Range #78

Open crajarshi opened 9 years ago

crajarshi commented 9 years ago

My pom file is as below :-

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <!--<id>default-war</id>-->
                        <phase>package</phase>
                        <goals>
                            <goal>war</goal>
                        </goals>
                        <configuration>
                            <warSourceDirectory>src/main/minified</warSourceDirectory>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
        <warSourceDirectory>src/main/minified</warSourceDirectory>
        <encoding>UTF-8</encoding>
        <webResources>
            <resource>
                <directory>${project.build.directory}/min</directory>
            </resource>
        </webResources>
    </configuration>
            </plugin>
            <plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>yuicompressor-maven-plugin</artifactId>
    <version>1.5.1</version>
    <executions>
        <execution>
            <id>compressyui</id>
            <phase>process-resources</phase>
            <goals>
                <goal>compress</goal>
            </goals>
            <configuration>
                <nosuffix>true</nosuffix>
                <warSourceDirectory>src/main/minified</warSourceDirectory>
                <webappDirectory>${project.build.directory}/min</webappDirectory>
                <jswarn>false</jswarn>
                <nosuffix>true</nosuffix>
            </configuration>
        </execution>
    </executions>
</plugin>

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 :-

***--- yuicompressor-maven-plugin:1.5.1:compress (compressyui) @ icoreWeb ---
accountmgmt.css (28786b) -> accountmgmt.css (20283b)[70%]
fields.css (10674b) -> fields.css (7808b)[73%]
footer.css (5406b) -> footer.css (3790b)[70%]
apex-popup.css (2789b) -> apex-popup.css (1985b)[71%]
apex.css (62931b) -> apex.css (45028b)[71%]
bookingDisclosure.css (683b) -> bookingDisclosure.css (505b)[73%]
fields.css (9684b) -> fields.css (6622b)[68%]
apex.css (6439b) -> apex.css (4899b)[76%]
ie.css (7071b) -> ie.css (4878b)[68%]
rwd.css (25589b) -> rwd.css (17455b)[68%]
circle.css (457b) -> circle.css (288b)[63%]
contentOne.css (1105b) -> contentOne.css (699b)[63%]
contentOneHeader.css (56b) -> contentOneHeader.css (36b)[64%]
disclosure.css (11116b) -> disclosure.css (8832b)[79%]
footer.css (4983b) -> footer.css (3676b)[73%]
hispanicFieldStyle.css (2663b) -> hispanicFieldStyle.css (1627b)[61%]
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 8.435s
Finished at: Tue Dec 30 16:20:20 EST 2014
Final Memory: 31M/64M
------------------------------------------------------------------------
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]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[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 wrong here

davidB commented 9 years ago

Sorry for late reply. Do you resolve your issue ?