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

Kristian Rosenvold commented on MASSEMBLY-670:
----------------------------------------------

It would appear one source of this problem can be seen in 
java.io.File#lastModified, which is the source of the "0" value creating 
UNKNOWN_MODIFICATION_DATE. There is a note about I/O errors or nonexistent 
files creating this response. I suggest you attach a debugger to assembly and 
try to determine what is happening when you get the nonexistent value. 
(Checkout assembly sources and just run with mvnDebug) 

There is a note in File.lastModified that we may use 
java.nio.file.Files#readAttributes(Path,Class,LinkOption[]) on jdk7 to detect 
this attribute without the annoying side effect of swallowing exceptions. 
Someone might patch up 
org.codehaus.plexus.components.io.resources.PlexusIoFileResource#getLastModified
 (surrounded by an test of 
org.codehaus.plexus.components.io.attributes.Java7Reflector#isJava7) to use the 
new method on jdk7.

As for the stack trace, I'll have to look at that tonight
                
> assembly plugin tar.gz format does not preserve timestamps of files it adds 
> to archive
> --------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-670
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-670
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: component descriptor
>    Affects Versions: 2.4
>         Environment: linux
>            Reporter: Steve Cohen
>
> The .tar.gz archives created by the assembly plugin do not preserve the 
> timestamps of the files it adds to the archive.  There is no setting to 
> override this.
> This differs from the functionality of the tar program.  That program 
> preserves timestamps by default, when adding to the archive and there is no 
> option to change this, although there are options to change the timestamps on 
> extraction.
> The maven plugin should emulate tar here, I would think.

--
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

Reply via email to