You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@codehaus.org> on 2014/12/15 09:56:10 UTC

[jira] (MRESOURCES-168) Don't overwrite unchanged resource to prevent unnecessary subsequent processing

    [ https://jira.codehaus.org/browse/MRESOURCES-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359080#comment-359080 ] 

Vladimir Sitnikov commented on MRESOURCES-168:
----------------------------------------------

As far as I can understand, org.apache.maven.shared.filtering.DefaultMavenFileFilter#filterFile is responsible for this filtering.
I've filed a bug for maven-filtering: MSHARED-394


> Don't overwrite unchanged resource to prevent unnecessary subsequent processing
> -------------------------------------------------------------------------------
>
>                 Key: MRESOURCES-168
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-168
>             Project: Maven Resources Plugin
>          Issue Type: Improvement
>          Components: filtering
>         Environment: MVN3.0.4 Win7 Pro SP1 64 Bit JDK 1.6.0_07
>            Reporter: Markus KARG
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)