好的,我想通过testing Clojure with Maven这个问题的答案中的信息得到一些帮助。
诀窍是下面的部分添加到pom.xml中:
<build>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.8</version>
<executions>
<execution>
<id>test-clojure</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>src/test/clojure</directory>
</testResource>
</testResources>
</build>
这有运行Clojure的测试案例的标准Maven的测试目标的一部分的作用。
编辑
截至2012年,一个很好的替代方案是使用cljunit作为一个普通的JUnit测试套件的一部分运行Clojure的测试。