Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
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
- depends upon
-
MSHARED-394 Avoid rewrite of destination in DefaultMavenFileFilter#filterFile when producing the same contents
- Closed
- duplicates
-
MSHARED-394 Avoid rewrite of destination in DefaultMavenFileFilter#filterFile when producing the same contents
- Closed
- is related to
-
MRESOURCES-155 Add an option to NOT copy resources if the source haven't changed, even though the filtering is ON
- Closed