kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-2719; Use wildcard classpath for dependant-libs
Date Tue, 03 Nov 2015 16:10:43 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 7c3347527 -> 694e03c35


KAFKA-2719; Use wildcard classpath for dependant-libs

PR switches to wildcard classpath for dependant libs to restrict the length of classpath,
thereby reducing command line length.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #400 from rajinisivaram/KAFKA-2719


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/694e03c3
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/694e03c3
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/694e03c3

Branch: refs/heads/trunk
Commit: 694e03c35582212749db5efaabd98b9f723609d5
Parents: 7c33475
Author: Rajini Sivaram <rajinisivaram@googlemail.com>
Authored: Tue Nov 3 08:10:37 2015 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Nov 3 08:10:37 2015 -0800

----------------------------------------------------------------------
 bin/kafka-run-class.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/694e03c3/bin/kafka-run-class.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
index d98533d..cfddae0 100755
--- a/bin/kafka-run-class.sh
+++ b/bin/kafka-run-class.sh
@@ -31,9 +31,10 @@ if [ -z "$SCALA_BINARY_VERSION" ]; then
 fi
 
 # run ./gradlew copyDependantLibs to get all dependant jars in a local dir
-for file in $base_dir/core/build/dependant-libs-${SCALA_VERSION}*/*.jar;
+shopt -s nullglob
+for dir in $base_dir/core/build/dependant-libs-${SCALA_VERSION}*;
 do
-  CLASSPATH=$CLASSPATH:$file
+  CLASSPATH=$CLASSPATH:$dir/*
 done
 
 for file in $base_dir/examples/build/libs//kafka-examples*.jar;
@@ -66,29 +67,30 @@ do
   CLASSPATH=$CLASSPATH:$file
 done
 
-for file in $base_dir/tools/build/dependant-libs-${SCALA_VERSION}*/*.jar;
+for dir in $base_dir/tools/build/dependant-libs-${SCALA_VERSION}*;
 do
-  CLASSPATH=$CLASSPATH:$file
+  CLASSPATH=$CLASSPATH:$dir/*
 done
 
 for cc_pkg in "api" "runtime" "file" "json"
 do
-  for file in $base_dir/copycat/${cc_pkg}/build/libs/copycat-${cc_pkg}*.jar $base_dir/copycat/${cc_pkg}/build/dependant-libs/*.jar;
+  for file in $base_dir/copycat/${cc_pkg}/build/libs/copycat-${cc_pkg}*.jar;
   do
     CLASSPATH=$CLASSPATH:$file
   done
+  if [ -d "$base_dir/copycat/${cc_pkg}/build/dependant-libs" ] ; then
+    CLASSPATH=$CLASSPATH:$base_dir/copycat/${cc_pkg}/build/dependant-libs/*
+  fi
 done
 
 # classpath addition for release
-for file in $base_dir/libs/*.jar;
-do
-  CLASSPATH=$CLASSPATH:$file
-done
+CLASSPATH=$CLASSPATH:$base_dir/libs/*
 
 for file in $base_dir/core/build/libs/kafka_${SCALA_BINARY_VERSION}*.jar;
 do
   CLASSPATH=$CLASSPATH:$file
 done
+shopt -u nullglob
 
 # JMX settings
 if [ -z "$KAFKA_JMX_OPTS" ]; then


Mime
View raw message