switched to Java 21

This commit is contained in:
2024-12-23 13:20:55 +01:00
parent cd98315d43
commit ca48e5621b
2 changed files with 8 additions and 3 deletions

View File

@ -102,7 +102,12 @@ public class DownloadJars extends AuthenticatedServlet {
}
private ExecutionResult executeMaven(File tempDirJars) throws IOException, InterruptedException {
String mavenCmd = String.format("%s dependency:copy-dependencies -DoutputDirectory=%s", configuration.getMavenExecutable(), tempDirJars.getCanonicalPath());
String[] mavenCmd = new String[]{
configuration.getMavenExecutable(),
"dependency:copy-dependencies",
String.format("-DoutputDirectory=%s", tempDirJars.getCanonicalPath())
};
Process mvnProcess = Runtime.getRuntime().exec(mavenCmd, null, tempDirJars.getCanonicalFile());
String stdout = new String(mvnProcess.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
String stderr = new String(mvnProcess.getErrorStream().readAllBytes(), StandardCharsets.UTF_8);