Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin tasks doesn't honour :library-path directive (lein swank doesn't work unless swank is in lib/) #29

Closed
sunkencity opened this issue Mar 18, 2010 · 7 comments

Comments

@sunkencity
Copy link

(defproject website "0.1.0-SNAPSHOT"
:dependencies [[org.buntin/compojure "0.4.0-SNAPSHOT"] [hiccup "0.4.0-SNAPSHOT"] [org.clojure/clojure "1.1.0"][org.clojure/clojure-contrib "1.1.0"] [ring "0.1.1-SNAPSHOT"][com.google.appengine/appengine-tools-sdk "1.3.0"]]
:dev-dependencies [[swank-clojure "1.1.0"] [leiningen/lein-swank "1.2.0-SNAPSHOT"]]
:namespaces [website]
:main website
:compile-path "war/WEB-INF/classes/"
:library-path "war/WEB-INF/lib/")

---- problem described below:

$ lein swank

swank is not a task. Use "help" to list all tasks.

$ ls war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

$ mkdir lib

$ cp war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar lib/

$ ls lib/

lein-swank-1.2.0-20100308.145053-1.jar

$ lein swank
[null] user=> Connection opened on local port 4005
[null] #<ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4005]>

@robwolfe
Copy link
Collaborator

This bug was corrected some time ago. Make sure you use the latest stable version, namely 1.1.0.

$ ls

classes project.clj README src test war

$ ls war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

war/WEB-INF/lib/lein-swank-1.2.0-20100308.145053-1.jar

$ lein version

Leiningen 1.1.0 on Java 1.5.0_17 Java HotSpot(TM) Client VM

$ lein swank

user=> Connection opened on local port 4005

#<ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4005]>

@sunkencity
Copy link
Author

I use 1.1.0

$ lein -v
Leiningen 1.1.0 on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM

@sunkencity
Copy link
Author

weird, my comment didn't show up although I posted. Here again: I do run 1.1.0

lein -v
Leiningen 1.1.0 on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM

@robwolfe
Copy link
Collaborator

You're right. I used wrong version for test (my own experiment). Leiningen can find plugins only on system class path (defined in lein script), which does not honour :library-path. I played with using Leiningen class loader for finding plugins, but so far it is not ready solution.

@technomancy
Copy link
Owner

Yeah, the only way to fix this is to use the subclassloader to find plugin tasks. I probably won't implement this myself since I can't think of a good reason to override :library-path, but I would take a patch.

@technomancy
Copy link
Owner

I think this is fixed now that lib/dev is hardcoded for plugins.

@sunkencity
Copy link
Author

great!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants