[richfaces-issues] [JBoss JIRA] Created: (RF-8588) Compress resources in maven-resource-dependency-plugin

Andreas Panagiotidis (JIRA) jira-events at lists.jboss.org
Fri Apr 9 07:32:35 EDT 2010


Compress resources in maven-resource-dependency-plugin 
-------------------------------------------------------

                 Key: RF-8588
                 URL: https://jira.jboss.org/jira/browse/RF-8588
             Project: RichFaces
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: core
         Environment: RichFaces Resource Management Plugin
            Reporter: Andreas Panagiotidis
            Priority: Minor


Current plugin:

The maven-resource-dependency-plugin creates two files: custom-dependencies.js and custom-dependencies.xcss
Those are the project's javascript and css files packaged together.

New goal:

It compresses (minify) those "packaged files" : (the custom-dependencies.js and custom-dependencies.xcss)

What I have done already:

1. Copied the YuiCompressorMojo.java in the org.richfaces.cdk.rd.mojo, renamed it to YuiCompressorMojoPackage

2. Adapted the YuiCompressorMojoPackage, so it reads and minifies the custom-dependencies.js and custom-dependencies.xcss


/**
* Apply compression on JS and CSS (using YUI Compressor).
*
* @goal compress
* @phase process-resources
*/
public class YuiCompressorMojoPackage extends AbstractMojo {
....
}
 
Now, my pom that uses the maven-resource-dependency-plugin looks like:
<executions>
                    <execution>
                        <configuration>
                            <webSourceDirectory>${basedir}/WebContent/</webSourceDirectory>
                            <outputResourceDirectory>${project.build.outputDirectory}</outputResourceDirectory>
                            <afterScriptIncludes> ... </afterScriptIncludes>
                            <afterStyleIncludes>..... </afterStyleIncludes>
                            <gzip>false</gzip>
                            <nosuffix>true</nosuffix>
                            <nomunge>false</nomunge>
                        </configuration>
                        <goals>
                            <goal>assembly-resources</goal>
                            <goal>compress</goal>
                        </goals>
                    </execution>

After the execution the assembled resources get compressed.

I would like to commit this extension of the maven-resource-dependency-plugin 
What do you think?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list