maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject [maven] 01/01: [MNG-6386] project.baseUri is not a valid URL on Windows
Date Fri, 30 Mar 2018 20:07:49 GMT
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-6386
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 43b34598629f086523a333dc18665389643832a5
Author: Michael Osipov <michaelo@apache.org>
AuthorDate: Fri Mar 30 22:07:18 2018 +0200

    [MNG-6386] project.baseUri is not a valid URL on Windows
---
 .../project/interpolation/AbstractStringBasedModelInterpolator.java     | 2 +-
 .../src/test/java/org/apache/maven/project/PomConstructionTest.java     | 2 +-
 .../maven/model/interpolation/AbstractStringBasedModelInterpolator.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
index 913e2dd..34033ed 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
@@ -241,7 +241,7 @@ public abstract class AbstractStringBasedModelInterpolator
             {
                 if ( projectDir != null && "baseUri".equals( expression ) )
                 {
-                    return projectDir.getAbsoluteFile().toURI().toString();
+                    return projectDir.getAbsoluteFile().toPath().toUri().toString();
                 }
                 return null;
             }
diff --git a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
index ba5e3a0..4e94dca 100644
--- a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
@@ -1086,7 +1086,7 @@ public class PomConstructionTest
         throws Exception
     {
         PomTestWrapper pom = buildPom( "baseurl-interpolation/pom.xml" );
-        assertEquals( pom.getBasedir().toURI().toString(), pom.getValue( "properties/prop1"
).toString() );
+        assertEquals( pom.getBasedir().toPath().toUri().toString(), pom.getValue( "properties/prop1"
).toString() );
     }
 
     /* MNG-3811*/
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
index ae8a35e..ff094d4 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
@@ -158,7 +158,7 @@ public abstract class AbstractStringBasedModelInterpolator
                 {
                     if ( "baseUri".equals( expression ) )
                     {
-                        return projectDir.getAbsoluteFile().toURI().toString();
+                        return projectDir.getAbsoluteFile().toPath().toUri().toString();
                     }
                     return null;
                 }

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.

Mime
View raw message