Book Image

Learning PrimeFaces Extensions Development

By : Sudheer Jonna
Book Image

Learning PrimeFaces Extensions Development

By: Sudheer Jonna

Overview of this book

Table of Contents (14 chapters)
Learning PrimeFaces Extensions Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Maven resource optimizer plugin and its features


The PrimeFaces Extensions team provided a Maven resource plugin for optimizing resources. The resources can be optimized by compressing and merging the JS/CSS files and optimizing the loading of images using data URIs.

The Maven plugin integrates Google compiler closure and YUI compressor by taking advantage of both the plugins. The Google compiler closure provides better compression results for JavaScript files compared to the YUI compressor. However, the Google compiler can't be used for CSS files' compression; you have to use YUI compressor for it. The resource optimization provided by this plugin was better than the YUI-Compression plugin.

Each JavaScript file was better compressed in the simple mode itself, but in the advanced mode, the difference was dramatic. However, you need to be careful when using the advanced mode because unused functions were removed entirely.

Setting up and configuring the plugin

The Maven plugin for resource...