Reputation: 14258
In projects where there is a mix of java and clojure code such as, https://github.com/mikera/clisk
how would one launch a clojure repl to test out the code?
Upvotes: 2
Views: 230
Reputation: 8593
Add the clojure maven plugin to the pom. Then mvn compile
and the mvn clojure:repl
. The project's Java compiled classes will be available in the classpath, so you can import them from the REPL.
Upvotes: 2
Reputation: 12883
You could create a script that launched nRepl or the regular repl. It would need to be aware of the right things to put in the classpath. There might be a maven plugin that does this, although I haven't heard of one.
Another option would be to bake things like launching a repl directly in your application.
You could also program the application to reload code and/or run unit tests. I have a Clojure+Java application. I have menu options that appear when launched with certain system properties. The menu options reset the state of the application and reload all of the Clojure code. There's also a menu option that does that and then runs the unit tests, which puts up a JOptionPane message box to display results.
Upvotes: 1