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

does not handle symbolic links correctly

    Details

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

      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

        John Casey created issue -
        John Casey made changes -
        Field Original Value New Value
        Fix Version/s 2.0.1 [ 12348 ]
        John Casey made changes -
        Link This issue depends upon MCLEAN-5 [ MCLEAN-5 ]
        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.
        John Casey made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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 .
        John Casey made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        John Casey made changes -
        Link This issue depends upon MCLEAN-5 [ MCLEAN-5 ]
        Brett Porter made changes -
        Workflow Maven [ 48517 ] Maven New [ 51411 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:18:59 UTC 2015 [ 1428225539798 ]
        Mark Thomas made changes -
        Workflow jira [ 12718466 ] Default workflow, editable Closed status [ 12749877 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:46:24 UTC 2015 [ 1428273984175 ]
        Mark Thomas made changes -
        Workflow jira [ 12955893 ] Default workflow, editable Closed status [ 12992554 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        10d 22h 7m 1 John Casey 14/Feb/06 09:04
        In Progress In Progress Closed Closed
        3h 18m 1 John Casey 14/Feb/06 12:22

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development