You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl-Heinz Marbaise (JIRA)" <ji...@codehaus.org> on 2015/03/14 13:31:18 UTC

[jira] (MWAR-238) User filtering of web resources

     [ https://jira.codehaus.org/browse/MWAR-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl-Heinz Marbaise closed MWAR-238.
------------------------------------

    Resolution: Cannot Reproduce

Unfortunately no further feedback. If you have any objections and new informations or update please don't hesitate to reopen the issue.

> User filtering of web resources
> -------------------------------
>
>                 Key: MWAR-238
>                 URL: https://jira.codehaus.org/browse/MWAR-238
>             Project: Maven WAR Plugin
>          Issue Type: New Feature
>          Components: filtering
>    Affects Versions: 2.1
>            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 was sent by Atlassian JIRA
(v6.1.6#6162)