Permalink
Browse files

Include mongodb (and other modules) in sqlline's classpath.

  • Loading branch information...
julianhyde committed Sep 27, 2013
1 parent 871d963 commit 0073e29d8ec3153c735e0f010595cde85abd8009
Showing with 12 additions and 1 deletion.
  1. +3 −0 .gitignore
  2. +9 −1 sqlline
View
@@ -3,3 +3,6 @@ target
.idea
*.iml
settings.xml
.classpath.txt
.fullclasspath.txt
View
10 sqlline
@@ -2,10 +2,18 @@
# sqlline - Script to launch SQL shell
# Build classpath on first call. (To force rebuild, remove .classpath.txt.)
cd $(dirname $0)
if [ ! -f .classpath.txt ]; then
mvn dependency:build-classpath -Dmdep.outputFile=.classpath.txt
awk -v RS=: -v ORS=: '{if(!m[$0]) {m[$0]=1; print}}' .classpath.txt */.classpath.txt > .fullclasspath.txt
fi
exec java -cp "core/target/classes:core/target/test-classes:$(cat .classpath.txt)" sqlline.SqlLine "$@"
CP=
for module in core mongodb spark splunk; do
CP=${CP}${module}/target/classes:
CP=${CP}${module}/target/test-classes:
done
exec java -cp "${CP}$(cat .fullclasspath.txt)" sqlline.SqlLine "$@"
# End sqlline

0 comments on commit 0073e29

Please sign in to comment.