You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert James Oxspring (Jira)" <ji...@apache.org> on 2020/04/29 21:19:00 UTC

[jira] [Updated] (MRESOURCES-258) Only overwrite filtered resources when contents differ

     [ https://issues.apache.org/jira/browse/MRESOURCES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert James Oxspring updated MRESOURCES-258:
---------------------------------------------
    Description: 
When using {{mvn resources:copy-resources}} with filtering enabled, the destination file should only be overwritten if the contents have changed. 

Given a {{mvn resources:copy-resources}} call with filtering configured
 When an identical {{mvn resources:copy-resources}} operation is performed
 Then the destination file should remain unmodified

Given a {{mvn resources:copy-resources}} call with filtering configured and {{overwrite}} set {{true}}
 When an identical {{mvn resources:copy-resources}} operation is performed
 Then the destination file should be overwritten

  was:
When filtering files with the {{MavenFileFilter.copyFile}} method, the destination file should only be overwritten if the contents have changed. Currently we unconditionally overwrite the contents in this situation, potentially leading to unnecessary downstream work. When the {{overwrite}} parameter is {{true}} then overwriting should overwrite as it does now.

Given a {{copyFile}} call
 When an identical filterFile operation is performed
 Then the destination file should remain unmodified

Given a {{copyFile}} call with {{overwrite}} set {{true}}
 When an identical filterFile operation is performed
 Then the destination file should be overwritten


> Only overwrite filtered resources when contents differ
> ------------------------------------------------------
>
>                 Key: MRESOURCES-258
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-258
>             Project: Maven Resources Plugin
>          Issue Type: Improvement
>          Components: filtering
>            Reporter: Robert James Oxspring
>            Priority: Major
>
> When using {{mvn resources:copy-resources}} with filtering enabled, the destination file should only be overwritten if the contents have changed. 
> Given a {{mvn resources:copy-resources}} call with filtering configured
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should remain unmodified
> Given a {{mvn resources:copy-resources}} call with filtering configured and {{overwrite}} set {{true}}
>  When an identical {{mvn resources:copy-resources}} operation is performed
>  Then the destination file should be overwritten



--
This message was sent by Atlassian Jira
(v8.3.4#803005)