2013-09-30 8 views
0

IntelliJ 및 "La Clojure"플러그인에서 간단한 Clojure 테스트를 실행하려고합니다.Clojure 컴파일러 오류 : 해당 파일 또는 디렉토리가 없습니다.

나는이 오류 얻을 (helloTest.clj을)를 Clojure의 파일을 컴파일 할 때 : 나는 단자를 통해 절대 경로를 확인할 때, 내가 helloTest.clj 파일이 존재하는지 볼 수

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

을하지만, .

그렇다면 컴파일러가 파일을 찾지 못하는 이유는 무엇입니까?

그냥 경우에, 나는 helloTest.clj 파일의 내용을 추가합니다

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

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

(deftest test2 
    (is (= 2 2))) 
+0

적어도 프로젝트 디렉토리의 ABSOLUTEPATH를 포함 할 수 있습니까? – Jared314

+0

@ Jared314 ABSOLUTEPATH는/Users/my-computer-username/Documents/projects/company-name/projects/프로젝트 이름/모듈 이름/src/test/clojure/com/nameofthepackage /입니다. 일부 디렉토리의 이름을 변경했지만 구조는 동일합니다. –

+0

테스트 디렉토리가 모듈 등록 정보의 테스트 소스 디렉토리로 설정되어 있습니까? – Jared314

답변

0

마지막으로 clojure 플러그인에 대한 Maven 문제였습니다.

이 구성을 pom.xml에 추가 한 다음 작동했습니다.

<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> 
관련 문제