You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2010/09/23 23:54:32 UTC

[jira] Commented: (MRESOURCES-128) Custom resource filters

    [ http://jira.codehaus.org/browse/MRESOURCES-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236290#action_236290 ] 

Olivier Lamy commented on MRESOURCES-128:
-----------------------------------------

patch committed in rev 1000643.
I will close the issue when I will have add documentation.

> Custom resource filters
> -----------------------
>
>                 Key: MRESOURCES-128
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-128
>             Project: Maven 2.x Resources Plugin
>          Issue Type: New Feature
>            Reporter: Laurent Martelli
>            Assignee: Olivier Lamy
>         Attachments: MRESOURCES-128
>
>
> It would be very nice to be able to use some custom resource filters in addition to properties substitutions. For instance, one may want to "optimize" PNG images which may contain big proprietary chunks inserted by the editing software, which are totally useless to the running webapp, but usefull for editing the image.
> Being able to run an external program (like pngcrush in the case mentioned above) may be an option, but for maximum portability, a Java interface would be better (filtering PNG chunks is actually easy, and I already have a few Java classes to do that). The interface could look like this :
> public interface ResourceFilter {
>     void filterResource(InputStream input, OutputStream output, MavenContext context);
> }
> The context (I don't know if the class exists) could be used to retrieve the filter's configuration (some criteria specifying which chunks to include or exclude, for instance). Or maybe Maven is able to directly configure beans using their properties.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira