Maven plugin for resource optimization can compress and merge JavaScript and CSS files very efficiently. It produces better results than all plugins I know. The new Maven plugin combines Google Closure Compiler (for JavaScript files) and YUI Compressor (for CSS files). The new plugin is highly configurable and allows some nice features which don't exist in other plugins. I would like to mention some highlights:
- Flexible resource sets describing resources to be processed.
- Settings for compilation and warning levels for Google Closure Compiler. Defaults are SIMPLE_OPTIMIZATIONS and QUIET.
- Aggregation with or without compression.
- Suffix for compressed / aggregated files if needed.
- SubDirMode for files aggregation. Resources of each software module can be optimized separately in an easy way. It makes sense e.g. for component / widget development because you can say "merge files for component A to one big file and don't merge files for component B".
- Possiblity to define a file to be prepended to the aggregated file.
- Possiblity to build compressed and uncompressed resources at the same time. PrimeFaces community already asked about uncompressed resources for development stage. RichFaces and some other libs can deliver uncompressed resources if the ProjectStage is "Development". We have also done this for PrimeFaces Extensions by means of this plugin. A special JSF ResourceHandler can stream down uncompressed resources to the browser for the ProjectStage "Development". Never crypto-messages like "e is undefined" anymore!
The next Maven plugin I'm planning to write is a CDK (component development kit) for PrimeFaces components (low prio, depends on free time). PrimeFaces has already one, but only for internal use. Futhermore, PrimeFaces's plugin doesn't generate component's source files under source folder (they are not under version control) and has an expensive configuration. The new CDK will be configurable via name conventions and avoid expensive configuration. The technique for that will be Java Emitter Templates (JET) from Eclipse Modeling Framework. Here is again - every help is appreciated. We have some code styles, so that our code is clean and optimized. But it's not a problem at all to follow them, even in a remote team. I'm convinced, the work in a distributed team can be very efficient.
Hi Oleg, first of all congratulations for the primefaces extensions project, the showcase is awesome!, I want to know if the primefaces extension project is compatible with the last primefaces RC2??? Thanks! and sorry for my english...
ReplyDeleteHi Sebastian,
ReplyDeleteMany thanks. We are fully compatible with PF 3.0.RC1. Never tested against RC2, but we have made all last changes for Ajax events as in RC2. I think, PF extensions project is compatible with RC2 as well. We will check this soon.
Thanks for the quick answer! right now i have time for make some tests! Great work!
ReplyDeleteGlad to hear, Sebastian. Right now we're working on Showcase (many use cases are not implemented yet). I hope we can release PF Extensions after PF final release and make it available in Maven central repo. We have postopend some interesting components / behaviors to 0.3-0.4 releases in order to make the upcoming 0.2 release as soon as possible.
ReplyDelete