-
Notifications
You must be signed in to change notification settings - Fork 57
Problem getting classpath or deps tree from leiningen #131
Comments
Thing is, local repositories are merged at the plugin-initialization level. I might either move it to middleware, or provide an exclusive |
It would really be better to move it to the middleware, so its use will be pervasive whatever lein command is called after that. |
Just afair middlewares in lein-droid are badly implemented, at least they were three years ago. Gotta take another look. |
@laurentpetit I fixed this bug, and just accidentally pushed |
Will test it ASAP, thanks! 2015-08-21 1:05 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
It's better than before: leiningen can now give a classpath to CCW. Here's what I get when doing lein classpath: 2015-08-21 13:44 GMT+02:00 Laurent PETIT laurent.petit@gmail.com:
Laurent Petit |
I only moved the repositories to middleware. What exactly are you trying to do, get a full classpath, or something more? |
Additional dependencies are merged into project (and end up on classpath eventually) in different hooks at different points of time. I'm not sure all of those can be moved to middleware, so I have to know what exactly you are trying to achieve. |
I am trying to get a full classpath to give that to Eclipse. So I'm doing basically 2015-08-21 15:30 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
Will |
I fear not, because it's not a generic solution :-( 2015-08-21 15:34 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
There's not much generic in |
Currently, CCW embeds leiningen, gets the project map from it, and calls Couldn't the droid plugin/middleware enhance the project map with the 2015-08-21 15:44 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
The point here is that most lein commands don't make sense in context of Android, and many lein-droid commands don't have Leiningen counterparts. And those commands that match semantically, they involve more than just updating the project map, they have different code inside. If CCW calls |
To answer your question first: once I have the classpath, Eclipse is happy. So do I understand well that the "fix" for having things to work with 2015-08-21 17:25 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
Yes, that would be the easy way to make it work. If it doesn't,I'll think Also, I suggest to bump to 0.4.1, fixed a subtle bug there. On Fri, Aug 21, 2015, 19:38 Laurent Petit notifications@github.com wrote:
|
Unfortunately, it doesn't work 2015-08-21 19:04 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
It's weird that it doesn't. But there is in fact no other way around this. Leiningen doesn't support putting extra stuff on classpath, so I have to hack the get-classpath function to do that. Those hooks are your only option. |
OK, thanks for having explored the possibilities! I'll try to find a 2015-08-24 18:20 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
Actually, you should try out |
@laurentpetit: Bump. All Leiningen commands see the new classpath now, so I will be really grateful if you check whether that works in your case too. Current version is |
OK, will do ASAP ! Thanks ! 2015-09-02 9:00 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
So, I tried with the following project.clj (see at the end), with Doing lein classpath on the command line also doesn't show android jars. The project.clj file I used: (defproject myccwapp/myccwapp "0.1.0-SNAPSHOT" :global-vars {warn-on-reflection true} :source-paths ["src/clojure" "src"] :dependencies [[org.clojure-android/clojure "1.7.0" :use-resources true]
:android {;; Specify the path to the Android SDK directory.
2015-09-02 9:37 GMT+02:00 Laurent PETIT laurent.petit@gmail.com:
Laurent Petit |
Try doing |
Indeed Alexander, so now it's back to a CCW issue, I'll deal with it, thanks ! 2015-09-05 13:07 GMT+02:00 Alexander Yakushev notifications@github.com:
Laurent Petit |
No problem. I don't know why it doesn't work correctly with your current project (which I assume is quite empty), but the case is quite marginal, so let's call it a non-matter unless it surfaces again. |
Trying to get the classpath from leiningen via
lein classpath
gives the following problem (it's as if the m2repository was not added to the project repositories):Also, trying to get the deps tree from leiningen via
lein deps :tree
gives a similar problem:Finally, trying a last resort solution, e.g. calling
lein repl
so that hopefully I could try to get the classpath from(System/getProperty "java.class.path")
won't work either (same problem).So I'm having a hard time figuring out how I can get the project classpath from Leiningen so that CCW in Eclipse can correctly set up the java build path.
Starting the discussion about it. The goal would be to find a way to get the classpath from leiningen via the classic methods.
The text was updated successfully, but these errors were encountered: