This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.2
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.2 by this push:
new 62c263b10 project build improvement
62c263b10 is described below
commit 62c263b100660f22e5581522123aa3480644c47c
Author: benjobs <[email protected]>
AuthorDate: Fri Oct 6 17:38:16 2023 +0800
project build improvement
---
.../org/apache/streampark/console/core/entity/Project.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
index 25a199002..c30928f54 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
@@ -45,6 +45,7 @@ import java.io.IOException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
+import java.util.jar.JarFile;
@Slf4j
@Data
@@ -192,6 +193,15 @@ public class Project implements Serializable {
CommandUtils.execute("mvn --version");
}
} catch (Exception e) {
+ File wrapperJar = new
File(WebUtils.getAppHome().concat("/.mvn/wrapper/maven-wrapper.jar"));
+ if (wrapperJar.exists()) {
+ try {
+ JarFile jarFile = new JarFile(wrapperJar, true);
+ jarFile.close();
+ } catch (Exception ignored) {
+ FileUtils.deleteQuietly(wrapperJar);
+ }
+ }
if (CommonUtils.isWindows()) {
mvn = WebUtils.getAppHome().concat("/bin/mvnw.cmd");
} else {