Eclipse PDT has this handy built-in Yui Compressor in the context menu for files. But when building a webapp that uses multiple such files, it becomes tedious to compress the files manually after each update. It doesn't even remember what files compress to which filenames, so you have to enter that again.
Is it possible to automate this process easily within Eclipse, so you can click on "build" or something and all specified files will be compressed to their targets?
There is really a vacuum concerning documentation about this Yui feature in Eclipse.
I am using Eclipse Indigo 3.7.0 with PDT 3.0.0.v20110516-11, but both PDT and the Yui option have remained pretty similar since Galileo
-update-
Automation solutions, not Eclipse-native but close:
GNU make makefile
%-min.js: %.js ${java} -jar ${compressor} $< -o ${<:.js=-min.js}
Windows Batch
FOR %f IN (*.js) DO java -jar yuicompressor.jar %f -o deploy\%f
Linux Shellscript
ls -1 *.js | awk '{printf("java -jar yuicompressor.jar %s -o deploy/%s",$1,$1)}' | /bin/sh
ANT file
See here: http://www.ubik-ingenierie.com/ubikwiki/index.php?title=Minifying_JS/CSS
How do I paste html/xml here?
Also see this question.