[ https://jira.codehaus.org/browse/MASSEMBLY-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335353#comment-335353 ]
Kristian Rosenvold commented on MASSEMBLY-670: ---------------------------------------------- I have looked a bit at this one, and it turns out to be a substantial change. Files are added to the assembly based on *actual* file system attributes (as they exist on disk somewhere), and when lineEnding or filtering is active, a copy is made elsewhere with filtering applied. AFAIK java cannot set the actual creation date on these newly created files. The API in plexus archiver (the underlying archive creator) does not allow us to supply information like file creation date on a per-file level, which is one version of what we'd need to make this work. Alternately plexus-archiver could accept some kind of filtering callback to do the filtering itself just as the file is written to disk. (I am talking a bit out loud here...) I am partial to moving the logic in org.apache.maven.plugin.assembly.format.FileSetFormatter#formatFileSetForAssembly to a callback that is applied directly to the stream in plexus-archiver; in that way we could avoid copying entirely for the filtering. (The file is actually rewritten a number of times for filtering/copying, so this change kind-of makes sense). I am not in a position to give any kind of promise regarding implementing such a feature. The filtering feature in plexus-archiver sounds like a fun patch to do, but it's a bit of a job. Btw: A side effect of all this is that if you can create multiple filesets, some with and some without filtering, you might be able to preserve *some* attributes. > Specifying <lineEnding> option of <fileSet> causes timestamps not to be > preserved > --------------------------------------------------------------------------------- > > 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 > > (Summary originally was "assembly plugin tar.gz format does not preserve > timestamps of files it adds to archive". Changed to reflect actual issue > discovered through investigation.) > 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