Blob Blame History Raw
From 3fdc686c9a4bab492d50cef707beef1f5f043153 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftweedal@redhat.com>
Date: Tue, 28 Jun 2016 15:50:36 +1000
Subject: [PATCH] Fix build on Fedora 25

Look for the right JAX-RS API JAR (it has moved in Fedora 25).

Also remove a lot of redundant 'find_file' operations for this JAR.

Fixes: https://fedorahosted.org/pki/ticket/2373
---
 base/CMakeLists.txt                    | 10 ++++++++++
 base/ca/src/CMakeLists.txt             |  7 -------
 base/common/src/CMakeLists.txt         |  7 -------
 base/java-tools/src/CMakeLists.txt     |  7 -------
 base/kra/src/CMakeLists.txt            |  7 -------
 base/ocsp/src/CMakeLists.txt           |  7 -------
 base/server/cms/src/CMakeLists.txt     |  7 -------
 base/server/cmscore/src/CMakeLists.txt |  7 -------
 base/server/tomcat/src/CMakeLists.txt  |  7 -------
 base/server/tomcat7/src/CMakeLists.txt |  7 -------
 base/server/tomcat8/src/CMakeLists.txt |  7 -------
 base/tks/src/CMakeLists.txt            |  7 -------
 base/tps/src/CMakeLists.txt            | 14 --------------
 13 files changed, 10 insertions(+), 91 deletions(-)

diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
index b9d5c7b..bb156ba 100644
--- a/base/CMakeLists.txt
+++ b/base/CMakeLists.txt
@@ -2,6 +2,16 @@ project(base)
 
 # The order is important!
 if (APPLICATION_FLAVOR_PKI_CORE)
+
+    find_file(JAXRS_API_JAR
+        NAMES
+            jaxrs-api.jar
+            jboss-jaxrs-2.0-api.jar
+        PATHS
+            ${RESTEASY_LIB}
+            /usr/share/java
+    )
+
     add_subdirectory(test)
     add_subdirectory(symkey)
     add_subdirectory(util)
diff --git a/base/ca/src/CMakeLists.txt b/base/ca/src/CMakeLists.txt
index 2a43c8d..854ce28 100644
--- a/base/ca/src/CMakeLists.txt
+++ b/base/ca/src/CMakeLists.txt
@@ -52,13 +52,6 @@ find_file(JACKSON_MAPPER_JAR
         /usr/share/java/jackson
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/common/src/CMakeLists.txt b/base/common/src/CMakeLists.txt
index 072bd00..ee41b2f 100644
--- a/base/common/src/CMakeLists.txt
+++ b/base/common/src/CMakeLists.txt
@@ -83,13 +83,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/java-tools/src/CMakeLists.txt b/base/java-tools/src/CMakeLists.txt
index 9a3c72f..e7ca5db 100644
--- a/base/java-tools/src/CMakeLists.txt
+++ b/base/java-tools/src/CMakeLists.txt
@@ -60,13 +60,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/kra/src/CMakeLists.txt b/base/kra/src/CMakeLists.txt
index bfc8cdd..400ec01 100644
--- a/base/kra/src/CMakeLists.txt
+++ b/base/kra/src/CMakeLists.txt
@@ -61,13 +61,6 @@ find_file(COMMONS_CODEC_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/ocsp/src/CMakeLists.txt b/base/ocsp/src/CMakeLists.txt
index d4a2009..32fcc92 100644
--- a/base/ocsp/src/CMakeLists.txt
+++ b/base/ocsp/src/CMakeLists.txt
@@ -46,13 +46,6 @@ find_file(LDAPJDK_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 # '${JAVA_LIB_INSTALL_DIR}' jars
 find_file(JSS_JAR
     NAMES
diff --git a/base/server/cms/src/CMakeLists.txt b/base/server/cms/src/CMakeLists.txt
index 33b1cd3..93f4a8a 100644
--- a/base/server/cms/src/CMakeLists.txt
+++ b/base/server/cms/src/CMakeLists.txt
@@ -90,13 +90,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/server/cmscore/src/CMakeLists.txt b/base/server/cmscore/src/CMakeLists.txt
index ef12938..32e4351 100644
--- a/base/server/cmscore/src/CMakeLists.txt
+++ b/base/server/cmscore/src/CMakeLists.txt
@@ -83,13 +83,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/server/tomcat/src/CMakeLists.txt b/base/server/tomcat/src/CMakeLists.txt
index 669cc88..4cb40ad 100644
--- a/base/server/tomcat/src/CMakeLists.txt
+++ b/base/server/tomcat/src/CMakeLists.txt
@@ -83,13 +83,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/server/tomcat7/src/CMakeLists.txt b/base/server/tomcat7/src/CMakeLists.txt
index f84369c..18f0b91 100644
--- a/base/server/tomcat7/src/CMakeLists.txt
+++ b/base/server/tomcat7/src/CMakeLists.txt
@@ -83,13 +83,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/server/tomcat8/src/CMakeLists.txt b/base/server/tomcat8/src/CMakeLists.txt
index 0f49ff9..db1b9dc 100644
--- a/base/server/tomcat8/src/CMakeLists.txt
+++ b/base/server/tomcat8/src/CMakeLists.txt
@@ -90,13 +90,6 @@ find_file(XERCES_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/tks/src/CMakeLists.txt b/base/tks/src/CMakeLists.txt
index d1ebbb1..51f98c9 100644
--- a/base/tks/src/CMakeLists.txt
+++ b/base/tks/src/CMakeLists.txt
@@ -68,13 +68,6 @@ find_file(COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
diff --git a/base/tps/src/CMakeLists.txt b/base/tps/src/CMakeLists.txt
index b8b13a9..5e51f60 100644
--- a/base/tps/src/CMakeLists.txt
+++ b/base/tps/src/CMakeLists.txt
@@ -28,13 +28,6 @@ find_file(COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(TOMCAT_CATALINA_JAR
     NAMES
         catalina.jar
@@ -77,13 +70,6 @@ find_file(PKI_NSUTIL_JAR
         /usr/share/java/pki
 )
 
-find_file(JAXRS_API_JAR
-    NAMES
-        jaxrs-api.jar
-    PATHS
-        ${RESTEASY_LIB}
-)
-
 find_file(RESTEASY_JAXRS_JAR
     NAMES
         resteasy-jaxrs.jar
-- 
2.5.5