Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.
Attachments
Attachments
Issue Links
- causes
-
MRESOURCES-288 make tests jar reproducible
- Closed