Minify CSS/JS ant revisited using YUI compressor

Ant

I have revisited adding Yui compressor into my work's ant build script to minify JS and CSS scripts. The current jar was yuicompressor-2.3.5.jar . It took a lot of playing around but I finally stumbled on how to get it to work. Here is the snippet for the yuicompressor. I had to jump through a couple hoops like overriding the current js/css scripts with the optimized js/css scripts. I'll release a full working copy in a zip, you can run against your webroot. We achieved an average 18% compression rate for all our js/css files. UPDATED: ADDED ZIP EXAMPLE Orginal Post: Adding JS/CSS compression and JS validation using YUI Compressor, JSLint, and jsmin to ant script


_
Now minifying js and css files

_