From 96c7702bc3c0060d8a349f33987768f789264ec9 Mon Sep 17 00:00:00 2001 From: Bryan Shell Date: Wed, 2 Sep 2015 14:45:04 -0500 Subject: [PATCH] STORM-1026: Expand external classpaths to include any jars --- bin/storm.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/storm.py b/bin/storm.py index 597426dbc24..fd82e00aa8b 100755 --- a/bin/storm.py +++ b/bin/storm.py @@ -103,7 +103,12 @@ def get_config_opts(): sys.exit(1) def get_jars_full(adir): - files = os.listdir(adir) + files = [] + if os.path.isdir(adir): + files = os.listdir(adir) + elif os.path.exists(adir): + files = [aidr] + ret = [] for f in files: if f.endswith(".jar"): @@ -117,9 +122,11 @@ def get_classpath(extrajars, daemon=True): if daemon: ret.extend(get_jars_full(STORM_DIR + "/extlib-daemon")) if STORM_EXT_CLASSPATH != None: - ret.extend(STORM_EXT_CLASSPATH) + for path in STORM_EXT_CLASSPATH.split(os.pathsep): + ret.extend(get_jars_full(path)) if daemon and STORM_EXT_CLASSPATH_DAEMON != None: - ret.extend(STORM_EXT_CLASSPATH_DAEMON) + for path in STORM_EXT_CLASSPATH_DAEMON.split(os.pathsep): + ret.extend(get_jars_full(path)) ret.extend(extrajars) return normclasspath(os.pathsep.join(ret))