switched to Java 21
This commit is contained in:
parent
cd98315d43
commit
ca48e5621b
4
pom.xml
4
pom.xml
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -102,7 +102,12 @@ public class DownloadJars extends AuthenticatedServlet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ExecutionResult executeMaven(File tempDirJars) throws IOException, InterruptedException {
|
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());
|
Process mvnProcess = Runtime.getRuntime().exec(mavenCmd, null, tempDirJars.getCanonicalFile());
|
||||||
String stdout = new String(mvnProcess.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
|
String stdout = new String(mvnProcess.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
|
||||||
String stderr = new String(mvnProcess.getErrorStream().readAllBytes(), StandardCharsets.UTF_8);
|
String stderr = new String(mvnProcess.getErrorStream().readAllBytes(), StandardCharsets.UTF_8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user