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

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.0
    • None
    • unpack, unpack-dependencies
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: