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:
masterJobWindows:
stage: windows
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
tags:
- Windows10
......
......@@ -18,8 +18,6 @@ import de.se_rwth.commons.logging.Log;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.attribute.PosixFilePermission;
import java.util.*;
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) {
try {
Files.setPosixFilePermissions(f.toPath(), perms);
} catch (IOException e) {
f.setExecutable(true, false);
} catch (Exception e) {
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