added support for .classpath files

This commit is contained in:
Micah 2011-06-30 17:09:17 -05:00 committed by Phil Hagelberg
parent 0a301ae611
commit 2fe610a9ee
3 changed files with 14 additions and 0 deletions

4
NEWS
View file

@ -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.

View file

@ -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"))"

View file

@ -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\..\.."