Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2662

SettingsBuilder internally converts network paths to local paths and is therefore preventing the use of network profiles

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.4
    • 2.0.7
    • Settings
    • None
    • Windows XP, Domain-Environment, Network User-Profile
    • Patch

    Description

      I'm not sure if this is a bug or intended but the DefaultMavenSettingsBuilder converts paths like "\\server\username\.m2\settings.xml" to "<Current Drive>:\server\username\.m2\settings.xml". This prevented us from using the default user.home because our userprofiles are located on another server and are referenced by "
      " network paths. It would've been quite complicated to change the user.home system property for all developers, so we fixed the problem by removing a regular expression that replaced double backslashes by only one, followed by calling "new File(path).getAbsolutePath()" which added the current drive letter to the path and converted it to a local path this way.

      I don't know the reason for removing double backslashes from the beginning but at least i didn't recognize any problems with my changes yet. It would be nice if somebody could tell me what the regexp was intended for. I attached a patch to this posting and hope it helps!

      Attachments

        1. maven-settings-patch-PROPER.diff
          1 kB
          Daniel Bechler
        2. patch.diff
          1 kB
          Daniel Bechler

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              sqisher Daniel Bechler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: