michael-o commented on code in PR #1413:
URL: https://github.com/apache/maven/pull/1413#discussion_r1492421726


##########
maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java:
##########
@@ -653,7 +653,7 @@ public ArtifactRepository 
createLocalRepository(MavenExecutionRequest request, F
 
     public ArtifactRepository createLocalRepository(File localRepository) 
throws InvalidRepositoryException {
         return createRepository(
-                "file://" + localRepository.toURI().getRawPath(),
+                localRepository.toURI().toASCIIString(),

Review Comment:
   > Hej! Could you help me with this? To me, it seems even Maven master works 
with "wrong" URIs, but somehow `File` works with them (the `new File(uri)` does 
the job), but to me somehow it looks like we end up with File instance that 
explodes when `File.toPath()` is invoked on that File instance.
   > 
   > See this PR: #1416
   > 
   > It passes on Win.
   > 
   > Then this PR, where the _only_ diff is that `new File(uri).toPath()` is 
invoked, and we end up with UT errors on Win like these: 
https://gist.github.com/cstamas/8cf6d3e6d55f62c70f7b857effcb7bc2
   
   There are subtile conversion issues with `File#toURI()` and `Path#toUri()`. 
They behave differently. See https://issues.apache.org/jira/browse/SUREFIRE-2211
   
   Try: `localRepository.toPath().toUri().toASCIIString()`. Then check whether 
it is absolute or that causes a problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to