I have a dependency on clj-record in my CounterClockwise project. What's the best way to manage this? Copy the source code or compile to a JAR and add it as a referenced library?
views:
38answers:
2
+1
A:
There are tools to help you:
- http://github.com/technomancy/leiningen <- project based
- http://github.com/liebke/cljr <- dependencies not project based
- http://github.com/ninjudd/cake <- alternative build tool
nickik
2010-09-29 21:40:54
These are all good tools, but they don't integrate with Eclipse. CounterClockwise gives you source level debugging etc. in Eclipse but there seems to be no pattern for specifying dependencies apart from hacking the code into your project or building a jar externally.
edoloughlin
2010-09-29 22:10:57
I don't know of any tools that interact with CCW directly. Somebody would have to write a plugin but I don't think anybody done that jet (not sure since I use emacs). You can try maven or grandle the should have plugins for the IDEs.
nickik
2010-09-30 05:52:25
A:
there seems to be no pattern for specifying dependencies apart from hacking the code into your project or building a jar externally.
Of course you can, just as with any java project. While dependency resolution isn't tied into eclipse (yet), once you retrieve the deps (via one of the command line tools nickik listed), you can specify which jars are to be included in the java build path of your eclipse project:
- Retrieve the deps via cake, leiningen, etc.
- Refresh the eclipse project so you see the deps (usually in the lib directory)
- Highlight the jars you want eclipse to know about
- Right-click, select Build Path > Add to Build Path
That's it. You can fiddle with the build path by going to the Java Build Path section of the project's properties window.
Alex Taggart
2010-10-02 19:01:01
This is what I ended up doing. I was hoping to be able to add Clojure source-level dependencies to help with debugging. However, it seems that debugging isn't quite there yet either, so I'm back to lien and the command line.
edoloughlin
2010-10-04 10:09:34