add plugin jar which state is ON

This commit is contained in:
judy0131 2020-07-27 05:04:38 -04:00
parent 3a82e813e8
commit 90bec8049f
1 changed files with 8 additions and 2 deletions

View File

@ -53,12 +53,18 @@ object FlowLauncher {
}
//add other jars for application
val pluginOnList = H2Util.getPluginOn()
val classPath = PropertyUtil.getClassPath()
val classPathFile = new File(classPath)
if(classPathFile.exists()){
FileUtil.getJarFile(new File(classPath)).foreach(f => {
println(f.getPath)
sparkLauncher.addJar(f.getPath)
pluginOnList.foreach( pluginName => {
if(pluginName == f.getName){
println(f.getPath)
sparkLauncher.addJar(f.getPath)
}
})
})
}