diff --git a/bin/lein-pkg b/bin/lein-pkg index 041819ed2..2fcda0ea8 100755 --- a/bin/lein-pkg +++ b/bin/lein-pkg @@ -83,12 +83,17 @@ lucene-memory maven-ant-tasks maven-artifact maven-artifact-manager \ maven-error-diagnostics maven-model maven-settings maven-project maven-profile \ maven-repository-metadata plexus-container-default-alpha plexus-interpolation \ plexus-utils wagon-file wagon-http-lightweight wagon-http-shared wagon-provider-api \ -xml-apis lucene-core lucene-highlighter clucy robert-hooke lancet leiningen +xml-apis lucene-core lucene-highlighter clucy robert-hooke lancet \ backport-util-concurrent" # NFI why that last one is necessary for JAR in $SHARE_JARS; do CLASSPATH="$CLASSPATH":"/usr/share/java/$JAR.jar" done +# Keep already-packaged Leiningen jar off the classpath during packaging. +if [ ! -r src/leiningen/core.clj ]; then + CLASSPATH="$CLASSPATH":/usr/share/java/leiningen-$LEIN_VERSION.jar +fi + if [ $DEBUG ]; then echo $CLASSPATH echo $CLOJURE_JAR @@ -113,7 +118,7 @@ if [ "$1" = "trampoline" ]; then if [ -r $TRAMPOLINE_FILE ]; then TRAMPOLINE="$(cat $TRAMPOLINE_FILE)" rm $TRAMPOLINE_FILE - exec sh -c "exec $TRAMPOLINE" + exec sh -c "TRAMPOLINE" fi else exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JVM_OPTS \