Uploaded image for project: 'Maven Clean Plugin'
  1. Maven Clean Plugin
  2. MCLEAN-58

Maven Clean Plugin ignores followSymLinks parameter on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6.1
    • None

    Description

      Most of old java software use getCanonicalFile() to determine symlink. But it is lie for windows. Lets look to org.apache.maven.plugin.clean.Cleaner:

      147 File canonical = followSymlinks ? file : file.getCanonicalFile();
      148 if ( followSymlinks || file.equals( canonical ) )

      getCanonicalFile() returns same path and folow symlink. In attached MavenCleanPluginNoFollowSymlinkBug.zip you found TestCase.bat that shows bug (just read it to understand than run). Unfortunately I know only one way to fix this - move to NIO that has isSymbolicLink() since java 1.7.

      Attachments

        Activity

          People

            krosenvold Kristian Rosenvold
            sergerus Sergei Makarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: