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

${project.baseUri} is not a valid URI (according to RFC 3986)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.3
    • Fix Version/s: 3.5.4
    • Component/s: None
    • Labels:
      None

      Description

      File#toURI produces an invalid URI on Windows:

      file:/C:/path/to/basedir

      A valid URI has to be:

      file:///C:/path/to/basedir

      Same issue for Unix-like OSes:

      file:/path/to/basedir

      A valid URI has to be:

      file:///path/to/basedir

      Using Path#toUri we can easily solve that problem because it creates compliant URIs. The failure occurs when interacting with local Git and Subversion repos:

      PS D:\Entwicklung\Projekte\maven-scm> svn ls file:/D:/Entwicklung/svn-repos/scm-svn-test-at-sign
      svn: E020024: Error resolving case of 'file:\D:\Entwicklung\svn-repos\scm-svn-test-at-sign'
      
      while the proper (new) havior will produce a valid URI:
      PS D:\Entwicklung\Projekte\maven-scm> svn ls file:///D:/Entwicklung/svn-repos/scm-svn-test-at-sign
      branches/
      tags/
      trunk/ 
      
      PS D:\Entwicklung\Projekte> git clone file:///D:/Entwicklung/git-repos/toll tlll2
      Cloning into 'tlll2'...
      warning: You appear to have cloned an empty repository.
      PS D:\Entwicklung\Projekte> git clone file:/D:/Entwicklung/git-repos/toll tlll2
      Cloning into 'tlll2'...
      ssh: Could not resolve hostname file: Name or service not known
      fatal: Could not read from remote repository.
      

      or Subversion repo at: D:\Entwicklung\svn-repos\это по-русский:

      PS D:\Entwicklung\Projekte> svn ls file:/D:/Entwicklung/svn-repos/это%20по-русский/
      svn: E020024: Error resolving case of 'file:\D:\Entwicklung\svn-repos\???%20??-???????\'
      

      proper URI gives:

      PS D:\Entwicklung\Projekte> svn ls file:///D:/Entwicklung/svn-repos/%D1%8D%D1%82%D0%BE%20%D0%BF%D0%BE-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/
      branches/
      tags/
      trunk/
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                michael-o Michael Osipov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: