[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 882 Removed redundant find_file() for Tomcat libraries.



The CMake scripts have been modified to remove redundant
invocations of find_file() to find Tomcat libraries.

https://fedorahosted.org/pki/ticket/2560

Pushed to master under trivial rule.

--
Endi S. Dewata
>From 843cbeed6ddab8f1883abce47a8c45e0fa14fc5a Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata redhat com>
Date: Thu, 15 Dec 2016 07:16:58 +0100
Subject: [PATCH] Removed redundant find_file() for Tomcat libraries.

The CMake scripts have been modified to remove redundant
invocations of find_file() to find Tomcat libraries.

https://fedorahosted.org/pki/ticket/2560
---
 base/CMakeLists.txt                    | 53 ++++++++++++++++++++++++++++------
 base/ca/src/CMakeLists.txt             | 15 ----------
 base/common/src/CMakeLists.txt         | 22 --------------
 base/kra/src/CMakeLists.txt            | 15 ----------
 base/server/cms/src/CMakeLists.txt     | 22 --------------
 base/server/cmscore/src/CMakeLists.txt | 22 --------------
 base/server/tomcat/src/CMakeLists.txt  | 22 --------------
 base/server/tomcat7/src/CMakeLists.txt | 22 --------------
 base/server/tomcat8/src/CMakeLists.txt | 29 -------------------
 base/tks/src/CMakeLists.txt            | 15 ----------
 base/tps/src/CMakeLists.txt            | 15 ----------
 11 files changed, 44 insertions(+), 208 deletions(-)

diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
index e29101cc8c0b002f2907031e1b540dc89b9f5d49..ef3189de8939674c6514dc3fafbb77f9cef3d663 100644
--- a/base/CMakeLists.txt
+++ b/base/CMakeLists.txt
@@ -1,5 +1,21 @@
 project(base)
 
+find_file(SERVLET_JAR
+    NAMES
+        servlet.jar
+    PATHS
+        /usr/share/java
+)
+
+find_file(JAXRS_API_JAR
+    NAMES
+        jaxrs-api.jar
+        jboss-jaxrs-2.0-api.jar
+    PATHS
+        ${RESTEASY_LIB}
+        /usr/share/java
+)
+
 find_file(SLF4J_API_JAR
     NAMES
         slf4j-api.jar
@@ -14,18 +30,37 @@ find_file(SLF4J_JDK14_JAR
         /usr/share/java/slf4j
 )
 
+find_file(TOMCAT_API_JAR
+    NAMES
+        tomcat-api.jar
+    PATHS
+        /usr/share/java/tomcat
+)
+
+find_file(TOMCAT_CATALINA_JAR
+    NAMES
+        catalina.jar
+    PATHS
+        /usr/share/java/tomcat
+)
+
+find_file(TOMCAT_UTIL_JAR
+    NAMES
+        tomcat-util.jar
+    PATHS
+        /usr/share/java/tomcat
+)
+
+find_file(TOMCAT_UTIL_SCAN_JAR
+    NAMES
+        tomcat-util-scan.jar
+    PATHS
+        /usr/share/java/tomcat
+)
+
 # 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 faa56281462e56e3f403efddec0b3415eb9c8384..c697966538002678e2ec7f9654adbe6aa413b2d4 100644
--- a/base/ca/src/CMakeLists.txt
+++ b/base/ca/src/CMakeLists.txt
@@ -66,21 +66,6 @@ find_file(RESTEASY_ATOM_PROVIDER_JAR
         ${RESTEASY_LIB}
 )
 
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
 # build pki-ca
 javac(pki-ca-classes
     SOURCES
diff --git a/base/common/src/CMakeLists.txt b/base/common/src/CMakeLists.txt
index 72815bbfed37cf9a42a10083ecb50e0f2192eff6..2c0672c3cda79d8d1275aa6e533799e15275fee2 100644
--- a/base/common/src/CMakeLists.txt
+++ b/base/common/src/CMakeLists.txt
@@ -37,28 +37,6 @@ find_file(APACHE_COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_JAR
-    NAMES
-        tomcat-util.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/kra/src/CMakeLists.txt b/base/kra/src/CMakeLists.txt
index ffe78a462d5aad3c8a244d40b2aea90a8f8b051e..2dbbad53ea07d23c73d863b34269004e72c85e56 100644
--- a/base/kra/src/CMakeLists.txt
+++ b/base/kra/src/CMakeLists.txt
@@ -75,14 +75,6 @@ find_file(RESTEASY_ATOM_PROVIDER_JAR
         ${RESTEASY_LIB}
 )
 
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(SYMKEY_JAR
     NAMES
         symkey.jar
@@ -97,13 +89,6 @@ find_file(COMMONS_LANG_JAR
 	/usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
 # build pki-kra
 javac(pki-kra-classes
     SOURCES
diff --git a/base/server/cms/src/CMakeLists.txt b/base/server/cms/src/CMakeLists.txt
index 5017ba87b6fe7fe6dcab0841e2ca9db738bf19cd..7c56595539849946d46897479c2c02be3183a089 100644
--- a/base/server/cms/src/CMakeLists.txt
+++ b/base/server/cms/src/CMakeLists.txt
@@ -44,28 +44,6 @@ find_file(COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_JAR
-    NAMES
-        tomcat-util.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/server/cmscore/src/CMakeLists.txt b/base/server/cmscore/src/CMakeLists.txt
index 4ac1d46f30efd9153f2cfa6b966173ce4622d55a..1f0fbf3dd21bad22980f1f7ad83d65726622c14d 100644
--- a/base/server/cmscore/src/CMakeLists.txt
+++ b/base/server/cmscore/src/CMakeLists.txt
@@ -37,28 +37,6 @@ find_file(APACHE_COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_JAR
-    NAMES
-        tomcat-util.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/server/tomcat/src/CMakeLists.txt b/base/server/tomcat/src/CMakeLists.txt
index 6bdc7c3886db310036e0606bde632dfd3d2d01d9..21d1c63311a7d2a6d0ad0b0f977ecdd6f45484b7 100644
--- a/base/server/tomcat/src/CMakeLists.txt
+++ b/base/server/tomcat/src/CMakeLists.txt
@@ -37,28 +37,6 @@ find_file(APACHE_COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_SCAN_JAR
-    NAMES
-        tomcat-util-scan.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/server/tomcat7/src/CMakeLists.txt b/base/server/tomcat7/src/CMakeLists.txt
index c8156138e735c77a8d83313b3b70fa9b8e330a60..0293abf03a20057ac4ce85873d88f916dde62d65 100644
--- a/base/server/tomcat7/src/CMakeLists.txt
+++ b/base/server/tomcat7/src/CMakeLists.txt
@@ -37,28 +37,6 @@ find_file(APACHE_COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_SCAN_JAR
-    NAMES
-        tomcat-util-scan.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/server/tomcat8/src/CMakeLists.txt b/base/server/tomcat8/src/CMakeLists.txt
index a80a2125ccb92b8b6f29f6e59d8e3b12436ca09d..110ad20ca82ff9ceea06c193651bddf9fe727304 100644
--- a/base/server/tomcat8/src/CMakeLists.txt
+++ b/base/server/tomcat8/src/CMakeLists.txt
@@ -37,35 +37,6 @@ find_file(APACHE_COMMONS_LANG_JAR
         /usr/share/java
 )
 
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_API_JAR
-    NAMES
-        tomcat-api.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(TOMCAT_UTIL_SCAN_JAR
-    NAMES
-        tomcat-util-scan.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(VELOCITY_JAR
     NAMES
         velocity.jar
diff --git a/base/tks/src/CMakeLists.txt b/base/tks/src/CMakeLists.txt
index 101430fd2ae77ad5db1454cdfc6bd7a9a05fba27..b08baeef3855803b925b84c7e253c5404cf0e2cd 100644
--- a/base/tks/src/CMakeLists.txt
+++ b/base/tks/src/CMakeLists.txt
@@ -89,21 +89,6 @@ find_file(SYMKEY_JAR
         ${JAVA_LIB_INSTALL_DIR}
 )
 
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
-find_file(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
 # build pki-tks
 javac(pki-tks-classes
     SOURCES
diff --git a/base/tps/src/CMakeLists.txt b/base/tps/src/CMakeLists.txt
index c5474946551fd78ae59f06635893c8013fae0e73..7bdfe10eaada6533ba311d0472477b30f74093b7 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(TOMCAT_CATALINA_JAR
-    NAMES
-        catalina.jar
-    PATHS
-        /usr/share/java/tomcat
-)
-
 find_file(PKI_CERTSRV_JAR
     NAMES
         pki-certsrv.jar
@@ -84,14 +77,6 @@ find_file(RESTEASY_ATOM_PROVIDER_JAR
         ${RESTEASY_LIB}
 )
 
-find_file(SERVLET_JAR
-    NAMES
-        servlet.jar
-    PATHS
-        ${JAVA_LIB_INSTALL_DIR}
-        /usr/share/java
-)
-
 find_file(SYMKEY_JAR
     NAMES
         symkey.jar
-- 
2.5.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]