2014-09-30 5 views
0

(만 테스트 자원을 복사하지만 테스트 클래스이다) 내가 실행할 때이 비어 대상/테스트 클래스에서 생성 된 테스트 클래스 일식에서 구축 할 때Maven은 명령 줄에서 테스트 클래스를 생성하지 않습니다

mvn clean install 

나는 그 클래스에 갔었어요 경우 다음과 같은 메시지

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) 
@ core --- [WARNING] File encoding has not been set, using platform 
encoding US-ASCII, i.e. build is platform dependent! [INFO] Compiling 
46 source files to 
/Users/root/Perforce/Server/DL/Server/dev/core/target/test-classes 
[INFO] [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ 
core --- 

가 궁금 참조하십시오. 내가

mvn -X install 

을 실행했을 때 나는

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) 
@ core --- [WARNING] File encoding has not been set, using platform 
encoding US-ASCII, i.e. build is platform dependent! [INFO] Compiling 
46 source files to 
/Users/root/Perforce/Server/DL/Server/dev/core/target/test-classes 
[INFO] [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ 
core --- 

[DEBUG] Output directory: 
/Users/root/Perforce/Server/DL/Server/dev/core/target/test-classess 
[DEBUG] CompilerReuseStrategy: reuseCreated [DEBUG] 
useIncrementalCompilation enabled [DEBUG] Stale source detected: 
/Users/root/Perforce/Server/DL/Server/dev/core/src/test/java/test/datastore/FileTest.java 

그리고 다른 모든 파일

을 보았다.

테스트가 다음 단계에서 실행될 수 있도록 컴파일 된 테스트 클래스가없는 이유를 더 자세히 디버깅하는 방법을 제안하십시오.

이것은 상위 프로젝트의 하위 프로젝트이며 다른 모든 하위 프로젝트의 테스트 클래스는 컴파일되고 실행되지만이 하위 프로젝트는 아니라는 점에 유의하십시오. 이상한 부모 POM 모든 설정을 가지고 있으므로 이것에 대해 특별한 것이 확실하지 않습니다

+0

빌드를 수행 한 후 대상 폴더를 새로 고치고 mvn 새로 설치를 수행 할 때 테스트를 실행하도록 설정 했습니까? – vikeng21

+0

@ vikeng21 "새로 고침"이란 무엇을 의미합니까? "ls target/test-classes " – SoulMan

+0

당신은 unix/linux 상자에서이 문제를 보거나 Windows에서 명령을 실행하고 있습니까? 다시 테스트를 실행할 수있게했습니다 – vikeng21

답변

0

마지막으로 문제가 발견되었습니다. 다음 파일이 패턴은 내가

#test.MyAnnotation 

test.MyAnnotation 

에서 패턴을 변경하고 일

src/test/resources/META-INF/services/javax.annotation.processing.Processor 

패턴과 일치하지 않는 테스트 케이스를 무시 된 언급했다! 어떤 문제가 무엇인지 추측하고 선택적으로 테스트를 실행하는 것입니까?

관련 문제