Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-119

dir format will fail with an error because it can not install the directory into the repository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2-beta-1
    • None
    • None

    Description

      See the discussion on MASSEMBLY-39 which originally created the dir format.

      I believe the dir format should never be added to the repository as it's only purpose is to ease the development process by providing an un-archived version ready for testing on disk.

      The workaround is to manually extract the archive, or to create a second duplicate descriptor and use that to create the directory version (do not bind this second one to the package phase)

      Will attach example project shortly.

      The error received is:

      [INFO] [install:install]
      [INFO] Installing <path>\target\<artifactId>-0.0.1-SNAPSHOT.jar to
      <repo>\.m2\repository\<groupId>\<artifactId>\0.0.1-SNAPSHOT\<artifactId>-0.0.1-SNAPSHOT.jar
      [INFO] Installing <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin.dir to
      <repo>\.m2\repository\<groupId>\<artifactId>\0.0.1-SNAPSHOT\<artifactId>-0.0.1-SNAPSHOT-bin.dir
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error installing artifact:
      <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin.dir (Acc
      ess is denied)

      When I run with -X the root cause error is:

      Caused by: java.io.FileNotFoundException:
      <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin.
      dir (Access is denied)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:820)
      at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:70)

      Attachments

        1. MASSEMBLY-119 Format dir fails on install.zip
          7 kB
          Barrie Treloar
        2. MASSEMBLY-119-patch.txt
          4 kB
          Barrie Treloar
        3. MASSEMBLY-119-patch.txt
          41 kB
          Barrie Treloar

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              baerrach Barrie Treloar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: