Skip to content

Commit 4f48f90

Browse files
authored
Merge pull request #50866 from gsmet/3.27-fix-copy-attributes
[3.27] Avoid using COPY_ATTRIBUTES when copying the jars of fast jar
2 parents f1a0561 + ed7e7ea commit 4f48f90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,9 @@ private void copyDependency(Set<ArtifactKey> parentFirstArtifacts, OutputTargetB
953953
.setPath(targetPath)
954954
.setResolvedDependency(appDep);
955955
if (removedFromThisArchive.isEmpty()) {
956-
Files.copy(resolvedDep, targetPath, StandardCopyOption.REPLACE_EXISTING,
957-
StandardCopyOption.COPY_ATTRIBUTES);
956+
// let's not use COPY_ATTRIBUTES to make sure we respect the system umask
957+
Files.copy(resolvedDep, targetPath, StandardCopyOption.REPLACE_EXISTING);
958+
Files.setLastModifiedTime(targetPath, Files.getLastModifiedTime(resolvedDep));
958959
} else {
959960
// we copy jars for which we remove entries to the same directory
960961
// which seems a bit odd to me

0 commit comments

Comments
 (0)