質問

I'm trying to execute a simple Clojure Test from IntelliJ and "La Clojure" plugin.

When I try to compile the Clojure file (helloTest.clj) I get this error:

Clojure Compiler: java.io.IOException: No such file or directory, compiling:(/ABSOLUTEPATH/helloTest.clj:1)

But, when I check via terminal the absolute path, i can see that the helloTest.clj file exists.

So, how is it possible that compiler cannot found the file if it exists?

Just in case, I add the content of helloTest.clj file:

(ns com.nameofthepackage.helloTest
  (:use clojure.test))

(deftest test1
  (is (= 1 3)))

(deftest test2
  (is (= 2 2)))
役に立ちましたか?

解決 2

Finally, I've found that was a Maven issue with the clojure plugin.

I've added this configuration to the pom.xml, and then it worked.

<plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>clojure-maven-plugin</artifactId>
                <version>1.3.13</version>
                    <extensions>true</extensions>
                    <configuration>
                        <sourceDirectories>
                            <sourceDirectory>src/main/clojure</sourceDirectory>
                        </sourceDirectories>
                        <testSourceDirectories>
                            <sourceDirectory>src/test/clojure</sourceDirectory>
                        </testSourceDirectories>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>test</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
            </plugin>

他のヒント

This issue is fixed in the plugin for IDEA 13, for IDEA 12 plugin (and a workaround) please see http://youtrack.jetbrains.com/issue/CLJ-237

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top