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 Scholte (JIRA)" <ji...@codehaus.org> on 2013/03/13 22:19:53 UTC

[jira] (MRESOURCES-145) Copying resources with no modication date silently is ignored

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

Robert Scholte commented on MRESOURCES-145:
-------------------------------------------

According to the JavaDoc
{quote}
*long java.io.File.lastModified()*

Returns the time that the file denoted by this abstract pathname was last modified.

*Returns:*
A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs
{quote}

That would mean it's quite impossible to have {{0L}}, but I'm pretty sure I've seen it, although not recently.
                
> Copying resources with no modication date silently is ignored
> -------------------------------------------------------------
>
>                 Key: MRESOURCES-145
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-145
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.5
>            Reporter: Bartolo
>
> If a file has no last modified date (File.lastModified() == 0), then the plugin just ignore it. This line in the file FileUtils.java of plexus-utils(2.0.5) is wrong:
> {{if ( to.lastModified() < from.lastModified() || overwrite )}}
> It will be evaluated to {{false}} always if {{overwrite}} flag is not set.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira