Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-140

Make unpack mojos check timestamp of archive entry when overIfNewer=true

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Auto Closed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: unpack, unpack-dependencies
    • Labels:
      None

      Description

      I intended to use the unpack mojo with the following configuration

      <overWriteReleases>false</overWriteReleases>
      <overWriteSnapshots>false</overWriteSnapshots>
      <overWriteIfNewer>true</overWriteIfNewer>
      

      to copy files from a JAR somewhere into the src/ hierarchy of another project, if and only if

      • the target file does not exist yet or
      • the target file is older than the file from the JAR

      Unlike the related Ant task UnZip, the mojo does not check the timestamps of the archive entries against the timestamps of the target files. In my case, this leads to the unwanted effect that target files are always overwritten, even if they are newer.

      The Plexus UnArchiver has a property overwrite that should be used by the plugin when unpacking files.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bentmann Benjamin Bentmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: