You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by GitBox <gi...@apache.org> on 2019/01/15 17:07:37 UTC

[maven] Diff for: [GitHub] michael-o closed pull request #42: MNG-5806. Fixing the finding of a child's parent pom.xml that is specifi...

diff --git a/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java b/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java
index 1a6fc2f415..12a1130b50 100644
--- a/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java
+++ b/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java
@@ -45,7 +45,14 @@ public FileSource( File file )
         {
             throw new IllegalArgumentException( "no file specified" );
         }
-        this.file = file.getAbsoluteFile();
+        try
+        {
+            this.file = file.getCanonicalFile();
+        }
+        catch ( IOException e )
+        {
+            throw new IllegalArgumentException( "Cannot read " + file, e );
+        }
     }
 
     @Override


With regards,
Apache Git Services