Upgrade YUI Compressor


CQ uses YUI Compressor to control the handling of client libraries for JavaScript and CSS minification to preserve the operational qualities of the code while reducing its overall byte footprint. The cq5.5 uses yuicompressor-2.3.6.jar. The latest yuicompressor-2.4.7.jar includes fixes for several bugs, such as media queries handling.


  1. Find the bundle that has yuicompressor. In CQ5.5, the bundle is Adobe Granite UI Commons (com.day.cq.cq-widgets) http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets
  2. Download the bundle JAR (com.adobe.granite.ui.commons-5.5.14.jar) inside cq quickstart
  3. Extract com.adobe.granite.ui.commons-5.5.14.jar & replace the yuicompressor-2.3.6.jar by yuicompressor-2.4.7.jar.
  4. Open META-INF/MANIFEST.MF and replace yuicompressor-2.3.6.jar by yuicompressor-2.4.7.jar in the Bundle-ClassPath manifest entry.
  5. Repack the JAR. The knowledgebase article has com.adobe.granite.ui.commons-5.5.14.jar, which already has the latest YUI compressor for your testing.
  6. Install the attached jar in this article (com.adobe.granite.ui.commons-5.5.14.jar) from felix console at http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets
  7. Delete everything under /var/clientlibs/* from crxde light & Save the changes.
  8. Restart the bundle http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets.



Test completely in lower envirnoment to ensure that updated YUI jar does not cause any problems.

Also AEM5.6 GA version contains latest yui 2.4.7 compressor.