pom.xml
파일을 최신 maven-compiler-version
, 3.6.0
및 -D=maven.test.skip=true
옵션을 사용하도록 업데이트하면 테스트 컴파일이 실제로 건너 뛰지 않습니다.Maven 컴파일러 maven.test.skip을 true로 설정하여 테스트를 다시 컴파일하는 플러그인
아래 다음 샘플 POM을 바탕으로 :
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.sample</groupId>
<artifactId>sample-compiler</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
</project>
호출 할 때 효과적으로 테스트 컴파일을 건너 뛸 것 이전 3.5.1
에 maven-compiler-plugin
버전을 설정하는 동안 :
mvn clean test -Dmaven.test.skip=true
생산겠습니까 :
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ sample-compiler ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ sample-compiler ---
[INFO] Tests are skipped.
그러나 upg 3.6.0
에 rading하고 위와 같은 명령을 호출, 우리는 할 것이다 :
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ sample-compiler ---
[INFO] Not compiling test sources
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\data\eclipse-workspace\sample-compiler\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ sample-compiler ---
[INFO] Tests are skipped.
참고 maven.test.skip
플래그가 실제로 무시하는 추가 Changes detected - recompiling the module!
의미를.
질문 : 회귀 또는 위의 프로세스에서 누락 된 것이 있습니까? 버그 리포트를 게시하려고 실제로 발견 동안
[MCOMPILER-284 (https://issues.apache.org/jira/browse/MCOMPILER-284). 아마도 회귀 예. – Tunaki
@ Tunaki 네, 사실 몇 분 후에 깨달았습니다. 나는 먼저 JIRA를 확인 했어야했는데 내 잘못 –
@ Tunaki는이 질문을 삭제해야합니까? –