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

Unpack goal does not fail build when destination could not be created and unpacks to current working directory instead

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 3.0.1
    • Component/s: unpack
    • Labels:
      None
    • Flags:
      Patch

      Description

      The unpack goal attempts to create the outputDirectory using File.mkdirs() if it does not exist. If this attempt fails for example due to not having write permission to the parent directory of outputDirectory then unfortunately the build reports that it succeeded and moreover unpacks the artifact to the current working directory.

      Attached is a example project in mdep-bug.zip that does not fail to build on mvn clean install on linux/unix despite the outputDirectory being on the root of the file system that would not normally be writeable by a non-root user. Additionally the artifacts are unpacked into the mdep-bug directory!

      Attached also is a patch to fix the behaviour and to unit test it.

        Attachments

        1. mdep-bug.zip
          1 kB
          Dave Moten
        2. mdep-bug-patch
          3 kB
          Dave Moten

          Activity

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              davidmoten Dave Moten
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: