XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5
    • 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

        1. MRESOURCES-128
          15 kB
          Olivier Lamy

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              lmartelli Laurent Martelli
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: