I made 3 changes to a new "Clojure 1.2 Maven project" to enable the
"Test" and "Clean and Build" commands to execute clojure.test tests
(using NetBeans 6.9.1 and enclojure 1.4.1):
(1) Renamed the autogenerated boilerplate test file, so the filename
agrees with the namespace declared inside the file. (The namespace
includes a dash, which the filename should represent with an
underscore.)
(2) Copying from
http://alexott.net/en/clojure/ClojureMaven.html,
revised the pom.xml to include a second <execution>, right below the
one whose ID is "compile-clojure":
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
(3) Revised the pom.xml to increase the clojure-maven-plugin version
to 1.3.8 (see
http://theoryinpractise.tumblr.com/post/7449277090/clojure-maven-plugin-1-3-8).
It is coincidentally also the latest version I found, browsing
http://mvnrepository.com/. Before I updated clojure-maven-plugin, the
tests ran twice.
There is still room for improvement. "Test" obscures the Clojure test
results (which appear on the Output tab) with a "Test Results" tab
that says, "No tests executed".