I’m developing a library that contains both Clojure and Java code, using Eclipse + Maven to manage the project.
I have a good set of JUnit tests that cover the Java portion of the code base, and also have a separate set of Clojure tests written using the standard clojure.test toolset.
Ideally I’d like to be able to run all tests simultaneously as part of the build process. I have the clojure-maven-plugin installed, but it still only seems to run the JUnit tests and ignores the Clojure ones.
How can I achieve this?
OK, I figured out how to do this myself with a little help from the information in the answers to this question on testing Clojure with Maven.
The trick was to add the following section to the pom.xml:
This has the effect of running the Clojure test cases as part of the standard Maven test goal.
EDIT
As of 2012, a good alternative is to use cljunit to run the Clojure tests as part of a regular JUnit test suite.