diff --git a/NEWS b/NEWS index f60530d0..45e0a3c2 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ Leiningen NEWS -- history of user-visible changes += 1.6.1 / TBD + +* Support for .classpath file to include context specific classpath elements. + = 1.6.0 / 2011-06-29 * Enforce project names as readable symbols. diff --git a/bin/lein b/bin/lein index 314e21cb..f6334909 100755 --- a/bin/lein +++ b/bin/lein @@ -72,6 +72,11 @@ LEIN_JAR="$HOME/.lein/self-installs/leiningen-$LEIN_VERSION-standalone.jar" CLOJURE_JAR="$HOME/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar" NULL_DEVICE=/dev/null +# apply context specific CLASSPATH entries +if [ -f .classpath ]; then + CLASSPATH="`cat .classpath`:$CLASSPATH" +fi + # normalize $0 on certain BSDs if [ "$(dirname "$0")" = "." ]; then SCRIPT="$(which $(basename "$0"))" diff --git a/bin/lein.bat b/bin/lein.bat index b9a824b3..d63b23c8 100644 --- a/bin/lein.bat +++ b/bin/lein.bat @@ -40,6 +40,11 @@ set LEIN_USER_PLUGINS=!LEIN_USER_PLUGINS!" set CLASSPATH="%CLASSPATH%";%LEIN_USER_PLUGINS%;%LEIN_PLUGINS%;test;src +rem Apply context specific CLASSPATH entries +set CONTEXT_CP="" +if exist ".classpath" set /P CONTEXT_CP=<.classpath +if NOT "%CONTEXT_CP%"=="" set CLASSPATH="%CONTEXT_CP%";%CLASSPATH% + if exist "%~f0\..\..\src\leiningen\core.clj" ( rem Running from source checkout. call :SET_LEIN_ROOT "%~f0\..\.."