From db8fb9d83150b1178d7845c56ac93b71136a7125 Mon Sep 17 00:00:00 2001 From: aiceflower Date: Mon, 15 Apr 2024 13:05:41 +0800 Subject: [PATCH] add path /* to classpath --- .../process/JavaProcessEngineConnLaunchBuilder.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala index 082b02a020..10395d7b59 100644 --- a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala +++ b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala @@ -120,12 +120,14 @@ abstract class JavaProcessEngineConnLaunchBuilder addPathToClassPath(environment, Seq(variable(PWD), ENGINE_CONN_CONF_DIR_NAME)) // then, add LINKIS_CONF_DIR conf dirs. addPathToClassPath(environment, Seq(EnvConfiguration.LINKIS_CONF_DIR.getValue)) - // then, add engineconn libs. - addPathToClassPath(environment, Seq(variable(PWD), ENGINE_CONN_LIB_DIR_NAME + "/*")) + // then, add public modules. if (!enablePublicModule) { addPathToClassPath(environment, Seq(LINKIS_PUBLIC_MODULE_PATH.getValue + "/*")) } + // then, add engineconn libs. + addPathToClassPath(environment, Seq(variable(PWD), ENGINE_CONN_LIB_DIR_NAME + "/*")) + // finally, add the suitable properties key to classpath engineConnBuildRequest.engineConnCreationDesc.properties.asScala.foreach { case (key, value) => if ( @@ -143,9 +145,9 @@ abstract class JavaProcessEngineConnLaunchBuilder def addFiles(files: String): Unit = if (StringUtils.isNotBlank(files)) { files .split(",") - .foreach(file => + .foreach(file => { addPathToClassPath(environment, Seq(variable(PWD), new File(file).getName)) - ) + }) } val configs: util.Map[String, String] =