You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2023/01/01 10:31:16 UTC

[maven-filtering] branch MSHARED-1112 created (now 28b60bb)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MSHARED-1112
in repository https://gitbox.apache.org/repos/asf/maven-filtering.git


      at 28b60bb  [MSHARED-1112] Ignore setting permissions on non existing dest files/symlinks

This branch includes the following new commits:

     new 28b60bb  [MSHARED-1112] Ignore setting permissions on non existing dest files/symlinks

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-filtering] 01/01: [MSHARED-1112] Ignore setting permissions on non existing dest files/symlinks

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MSHARED-1112
in repository https://gitbox.apache.org/repos/asf/maven-filtering.git

commit 28b60bb7cbeedc5c9c5917d29b86654425a01ec3
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sun Jan 1 11:31:08 2023 +0100

    [MSHARED-1112] Ignore setting permissions on non existing dest files/symlinks
---
 src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java b/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
index 3112d3c..8871434 100644
--- a/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
+++ b/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java
@@ -32,6 +32,7 @@ import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 import java.nio.file.Files;
 import java.nio.file.LinkOption;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.StandardCopyOption;
 import java.util.StringTokenizer;
 import java.util.regex.Pattern;
@@ -479,6 +480,10 @@ public final class FilteringUtils
                     Files.getPosixFilePermissions( source.toPath() )
             );
         }
+        catch ( NoSuchFileException nsfe )
+        {
+            // ignore if destination file or symlink does not exist
+        }
         catch ( UnsupportedOperationException e )
         {
             // fallback to setting partial permissions