From 108ac2ca1ca88af272842fc25a8d412d2607194c Mon Sep 17 00:00:00 2001 From: Tone Zhang Date: Tue, 30 Jan 2018 00:55:38 +0000 Subject: [PATCH] cmake: fix libcephfs-test.jar build failure When building Ceph Debian installation package, libcephfs-test.jar build would fail if multi junit versions are installed on the host. In src/java/CMakeLists.txt, the "junit" search order is "junit" and then "junit4". In case multi junit versions are installed, the lower version (like 3.8) is found firstly, but junit4 is required only. The search result will cause the failure. Fix the issue by change search order to firstly search junit4 by default. Fixes: http://tracker.ceph.com/issues/22828 Signed-off-by: Tone Zhang --- src/java/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt index 17e08d8677ebd..5276bc2c1ddb5 100644 --- a/src/java/CMakeLists.txt +++ b/src/java/CMakeLists.txt @@ -36,7 +36,7 @@ add_custom_target( add_dependencies(jni-header libcephfs) find_jar(JUNIT_JAR - NAMES junit junit4 + NAMES junit4 junit PATHS "/usr/share/java") if(JUNIT_JAR) set(CMAKE_JAVA_INCLUDE_PATH ${JUNIT_JAR} ${libcephfs_jar}) -- 2.39.5