Hello, 2010/2/22 Robert McIntyre <[email protected]>: > Has anyone successfully gotten clojure to play well with eclipse in > developing java code? > > By this I mean that the clojure code automatically compiles to class > files the same way as java files in eclipse do, and the whole thing > can then be packaged into a jar and made into a web start application? > > The only thing I have found to do this is the counterclockwise plugin, > but it's behavior is.... strange.
> It only compiles the .clj files when the REPL is open, and god forbid > you ever try to run make clean! It just completely fails at that > point and will not compile anything again (without restarting > eclipse). For sure, the current behavior of counterclockwise regarding the auto-compilation of clojure files needs some (!) polish. For example you cannot count on it for pre-compiling stuff before packaging. But that is true of the eclipse plugin or e.g. the eclipse PDE plugin, btw : you should rely on the IDE for doing its best while developing to auto-compile stuff, provide feedback, etc. But you should not rely on the auto-compile stuff of your IDE for packaging your app. You should rely on a script which makes things reliable and repeatable. Granted, currently counterclockwise does not provide that also :-$ At least yet. The good news is it is open source, and contributions are very welcome :-) What I'm doing currently is rely on it as far as possible, with its limitations, while developing, and I also have a "starter" namespaces whose sole purpose is to compile all namespaces that need to be compiled before "packaging". e.g. : file src/ccw/compile.clj (ns ccw.compile) (defn all [] (compile 'ccw.editors.antlrbased.PareditAutoEditStrategy) ... ...) and when I want to prepare the environment before packaging, I open a REPL on the src/ccw/compile.clj file, and quickly type (all) in the REPL which compiles everything I need. With a little ant script I could automate this even further. > I'm sure someone among you has used this stuff to actually make a > program that has to work with java in eclipse, so what do you guys > actually do in practice to make development run smoothly? HTH, -- Laurent -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
