Maven
  1. Maven
  2. MNG-2662

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.7
    • Component/s: Settings
    • Labels:
      None
    • Environment:
      Windows XP, Domain-Environment, Network User-Profile
    • Flags:
      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!

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

        Issue Links

          Activity

          Daniel Bechler created issue -
          Hide
          Daniel Bechler added a comment -

          Ups, sorry. The first patch was not created properly. Please use the attached version (maven-settings-patch-PROPER.diff) instead.

          Show
          Daniel Bechler added a comment - Ups, sorry. The first patch was not created properly. Please use the attached version (maven-settings-patch-PROPER.diff) instead.
          Daniel Bechler made changes -
          Field Original Value New Value
          Attachment maven-settings-patch-PROPER.diff [ 24195 ]
          Jason van Zyl made changes -
          Patch Submitted [Yes]
          Hide
          John Casey added a comment -

          Applied to 2.0.x branch; this fix doesn't apply to trunk.

          Show
          John Casey added a comment - Applied to 2.0.x branch; this fix doesn't apply to trunk.
          John Casey made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Benjamin Bentmann made changes -
          Assignee John Casey [ jdcasey ]
          Fix Version/s 2.0.7 [ 13138 ]
          Benjamin Bentmann made changes -
          Link This issue is duplicated by MNG-2580 [ MNG-2580 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-4700 [ MNG-4700 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12713216 ] Default workflow, editable Closed status [ 12753067 ]
          Mark Thomas made changes -
          Flags Patch [ 10430 ]
          Patch Submitted Yes [ 10763 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12952198 ] Default workflow, editable Closed status [ 12989552 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          197d 5h 11m 1 John Casey 01/Jun/07 19:12

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development