Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-168

Don't overwrite unchanged resource to prevent unnecessary subsequent processing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • filtering
    • None
    • MVN3.0.4 Win7 Pro SP1 64 Bit JDK 1.6.0_07

    Description

      When filtering resources, the resulting files' last-modified date is updated. This is correct, as the file just got produced. But, there might be lots of files that passed the filter unchanged – but now have changed last-modified date, too.

      This induces unneccesary subsequent processing and should be prevented.

      Example: Filtering of Java sources, then compiling those. The Java compiler typically will only compile modified files, but not thinks ALL files are modified.

      A solution could be to check whether at least one property was actually found in the filtered file and to reset the last-modified date in all other cases. Another solution could be to rename the previous output file and compare both files after filtering. If they are identical, the new fill can be discarded and the previous file can be renamed back.

      Attachments

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              mkarg Markus Karg
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: