Skip to content

Commit 1d10192

Browse files
committed
Fix setting of SPARK_EXAMPLES_JAR
1 parent 5584ebc commit 1d10192

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

bin/compute-classpath.sh

-11
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ function dev_classpath {
7676
CLASSPATH="$CLASSPATH:$jar"
7777
done
7878

79-
# Figure out the JAR file that our examples were packaged into. This includes a bit of a hack
80-
# to avoid the -sources and -doc packages that are built by publish-local.
81-
if [ -e "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar ]; then
82-
# Use the JAR from the SBT build
83-
export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar`
84-
fi
85-
if [ -e "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar ]; then
86-
# Use the JAR from the Maven build
87-
export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar`
88-
fi
89-
9079
# Add Scala standard library
9180
if [ -z "$SCALA_LIBRARY_PATH" ]; then
9281
if [ -z "$SCALA_HOME" ]; then

run

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# limitations under the License.
1818
#
1919

20+
SCALA_VERSION=2.9.3
21+
2022
# Figure out where the Scala framework is installed
2123
FWDIR="$(cd `dirname $0`; pwd)"
2224

@@ -136,6 +138,17 @@ if [ ! -f "$FWDIR/RELEASE" ]; then
136138
echo "You need to compile Spark repl module before running this program" >&2
137139
exit 1
138140
fi
141+
142+
# Figure out the JAR file that our examples were packaged into. This includes a bit of a hack
143+
# to avoid the -sources and -doc packages that are built by publish-local.
144+
if [ -e "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar ]; then
145+
# Use the JAR from the SBT build
146+
export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar`
147+
fi
148+
if [ -e "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar ]; then
149+
# Use the JAR from the Maven build
150+
export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar`
151+
fi
139152
fi
140153

141154
# Compute classpath using external script

0 commit comments

Comments
 (0)