I am new at Maven and even newer at Clojure. As an exercise to learn the language, I am writing a spider solitaire player program. I also plan on writing a similar program i
You probably want to point testSourceDirectory at src/test/clojure
:
<sourceDirectory>src/main/clojure</sourceDirectory>
<testSourceDirectory>src/test/clojure</testSourceDirectory>
You can look to this example of pom.xml with clojure-maven-plugin & tests. By default, clojure-maven-plugin should generate test-runner automatically, as described in documentation.
And it's better to use latest version of clojure-maven-plugin - 1.3.2, in which there are several bugs were fixed
I would not expect the surefire plugin to run something else than Java tests so, with your current setup, there is indeed "No tests to run". I suggest to use the clojure-maven-plugin here. Also check Why using Maven for Clojure builds is a no-brainer.
The key bit you're missing from your pom.xml (just cribbing from the clojure-contrib pom.xml) is an execution under the clojure-maven-plugin:
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.2</version>
<!-- Current Config -->
<executions>
<!-- ... -->
<execution>
<id>test-clojure</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
It may also be necessary to add something like this under <build/>
:
<testResources>
<testResource>
<directory>src/test/clojure</directory>
</testResource>
</testResources>