Maven Assembly Plugin
  1. Maven Assembly Plugin
  2. MASSEMBLY-343

add symbolic links managment (java7+ only supported)

    Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2-beta-2
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      linux, ubuntu
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      i need to buid archives ( tar for example ) with symbolic links

      the plugin build an archive with a file containing the destination of the link, not the link itself

      => the plugin need an option to know if deferencement of links is needed
      this is just like -h option of tar
      -h, --dereference
      don't dump symlinks; dump the files they point to

      actually, if you do an archive of /lib, for example, many file will be in double with diffÒ©rent names. extract of archive will not be the exactly the same as the source of the archive. => this is a test !

        Issue Links

          Activity

          Hide
          Ahmed El-Madhoun added a comment -

          By the way, I am using Maven 3, but I don't think that is an issue, would it be?

          Show
          Ahmed El-Madhoun added a comment - By the way, I am using Maven 3, but I don't think that is an issue, would it be?
          Hide
          Zuhayr Khan added a comment -

          It sounds like you're hoping that the assembly plugin will look at symlinks on your file-system and include them within the assembled package?

          This use case is what the discussion on PLXCOMP-117 covers. In summary, because of the lack of system-agnostic support for symbolic links (pre Java 7?) plexus-io doesn't read/identify symlinks in this manner.

          The patch here simply allows you to configure symlinks within the assembly-definition such that they are recorded in the tar/zip file as symlinks.

          If I've understood your use case correctly, to take advantage of this, you'd need to add a "symlinks" element (see my initial comment on this) to your assembly-definition that correspond to the actual symlinks on your file system.

          Hope that helps.

          Show
          Zuhayr Khan added a comment - It sounds like you're hoping that the assembly plugin will look at symlinks on your file-system and include them within the assembled package? This use case is what the discussion on PLXCOMP-117 covers. In summary, because of the lack of system-agnostic support for symbolic links (pre Java 7?) plexus-io doesn't read/identify symlinks in this manner. The patch here simply allows you to configure symlinks within the assembly-definition such that they are recorded in the tar/zip file as symlinks. If I've understood your use case correctly, to take advantage of this, you'd need to add a "symlinks" element (see my initial comment on this) to your assembly-definition that correspond to the actual symlinks on your file system. Hope that helps.
          Hide
          Ahmed El-Madhoun added a comment -

          I kind of figured that out once I looked more into the patch and this case. I am thinking of porting assembly plugin into JDK7 with ability to automatically package symlinks, would you be interested in helping out?

          Show
          Ahmed El-Madhoun added a comment - I kind of figured that out once I looked more into the patch and this case. I am thinking of porting assembly plugin into JDK7 with ability to automatically package symlinks, would you be interested in helping out?
          Hide
          Kristian Rosenvold added a comment -

          Symbolic links will work when archiver 2.6.1 is installed, but only for jdk 7 and above.

          Show
          Kristian Rosenvold added a comment - Symbolic links will work when archiver 2.6.1 is installed, but only for jdk 7 and above.
          Hide
          Kristian Rosenvold added a comment -

          Fixed with plexus-archiver upgrade. This will not be supported for < java7

          Show
          Kristian Rosenvold added a comment - Fixed with plexus-archiver upgrade. This will not be supported for < java7

            People

            • Assignee:
              Kristian Rosenvold
              Reporter:
              Godet Gilles
            • Votes:
              9 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: