[
https://jira.codehaus.org/browse/MWAR-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Lundberg updated MWAR-238:
---------------------------------
Component/s: filtering
> User filtering of web resources
> -------------------------------
>
> Key: MWAR-238
> URL: https://jira.codehaus.org/browse/MWAR-238
> Project: Maven 2.x WAR Plugin
> Issue Type: New Feature
> Components: filtering
> Affects Versions: 2.2
> Reporter: Laurent Martelli
> Attachments: filter.patch
>
>
> It would be very nice to be able to filter all web resources in all kinds of
> ways (not just property substitution).
> So I created a patch that allow you to filter resources bases on the
> extension (my purpose was to be able to remove unneeded chunks from PNG
> images to reduce their size, and to you YUI Compressor on css and javascript
> files). Here's a sample configuration for the patched plugin:
> {noformat}<configuration>
> <userFilters>
> <png>PNGFilter</png>
> <css>cssCompressor</css>
> <js>jsCompressor</js>
> </userFilters>
> </configuration>{noformat}
> I'm not fully satisfied with this patch because it does not let you configure
> the filters. I tried to instantiate filter objects from the configuration
> instead of using role-hints, but that did not seem to work.
> Ideally, I would like to be able to write this:
> {noformat}<configuration>
> <userFilters>
> <png>
> <PNGFilter>
> <excludeChunks>
> <excludeChunk>gAMA</excludeChunks>
> <excludeChunk>iCCP</excludeChunks>
> <excludeChunk>PRIVATE</excludeChunks>
> </excludeChunks>
> </PNGFilter>
> </png>
> <css>
> <cssCompressor>
> <breakPosition>80</breakPosition>
> </cssCompressor>
> </css>
> <js>
> <jsCompressor>
> <breakPosition>-1</breakPosition>
> <obfuscate>false</obfuscate>
> </jsCompressor>
> </js>
> </userFilters>
> </configuration>{noformat}
> Also, it may be better to attach filters to {{<webResource>}} in order to
> control more precisely which resources are filtered.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira