Maven Clean Plugin
  1. Maven Clean Plugin
  2. MCLEAN-4

does not handle symbolic links correctly

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None
    • Number of attachments :
      0

      Description

      inside removeDir(..), each file needs to be checked to see if it's a symbolic link. If so, the link should be deleted, not the referenced location. I think we can address this by adding a check similar to:

      if ( !f.getCanonicalPath().startsWith( d.getCanonicalPath() ) )
      {
      // don't process as a subdir, just erase the file. WILL THIS WORK?
      }

        Activity

        Hide
        John Casey added a comment -

        We should add a "followSymlinks" flag to the API in plexus FileUtils, and then give the clean mojo a parameter to control it.

        Show
        John Casey added a comment - We should add a "followSymlinks" flag to the API in plexus FileUtils, and then give the clean mojo a parameter to control it.
        Hide
        John Casey added a comment -

        added "followSymLinks" flag. Also added detection of symbolic links, and behavior which will either traverse the symlink while deleting, or else simply delete the link, depending on the value of the followSymLinks flag. The default value is false.

        Show
        John Casey added a comment - added "followSymLinks" flag. Also added detection of symbolic links, and behavior which will either traverse the symlink while deleting, or else simply delete the link, depending on the value of the followSymLinks flag. The default value is false .

          People

          • Assignee:
            John Casey
            Reporter:
            John Casey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: