Use File.setExecutable instead of posix set executable, remove purge local repo

parent d308968f
Pipeline #118302 passed with stages
in 21 minutes and 58 seconds
...@@ -7,7 +7,6 @@ stages: ...@@ -7,7 +7,6 @@ stages:
masterJobWindows: masterJobWindows:
stage: windows stage: windows
script: script:
- call mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B dependency:purge-local-repository -DactTransitively=false --settings settings.xml -U
- call mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml -U - call mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml -U
tags: tags:
- Windows10 - Windows10
......
...@@ -18,8 +18,6 @@ import de.se_rwth.commons.logging.Log; ...@@ -18,8 +18,6 @@ import de.se_rwth.commons.logging.Log;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.attribute.PosixFilePermission;
import java.util.*; import java.util.*;
public class DistributedTargetGenerator{ public class DistributedTargetGenerator{
...@@ -192,20 +190,10 @@ public class DistributedTargetGenerator{ ...@@ -192,20 +190,10 @@ public class DistributedTargetGenerator{
} }
}); });
Set<PosixFilePermission> perms = new HashSet<>();
perms.add(PosixFilePermission.OWNER_READ);
perms.add(PosixFilePermission.OWNER_WRITE);
perms.add(PosixFilePermission.OWNER_EXECUTE);
perms.add(PosixFilePermission.GROUP_READ);
perms.add(PosixFilePermission.GROUP_WRITE);
perms.add(PosixFilePermission.GROUP_EXECUTE);
perms.add(PosixFilePermission.OTHERS_READ);
perms.add(PosixFilePermission.OTHERS_WRITE);
perms.add(PosixFilePermission.OTHERS_EXECUTE);
for (File f : res) { for (File f : res) {
try { try {
Files.setPosixFilePermissions(f.toPath(), perms); f.setExecutable(true, false);
} catch (IOException e) { } catch (Exception e) {
Log.warn("Could not set permissions of " + f.getAbsolutePath()); Log.warn("Could not set permissions of " + f.getAbsolutePath());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment