Skip to content

Commit

Permalink
Reorganize Maven dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Jul 4, 2024
1 parent 02c6256 commit 4b29f9e
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 215 deletions.
67 changes: 41 additions & 26 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ find_file(SERVLET_JAR
)


if (EXISTS "${CMAKE_SOURCE_DIR}/lib")
if (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")
# use imported JARs

execute_process(
COMMAND ls ${CMAKE_SOURCE_DIR}/lib
COMMAND ls ${CMAKE_SOURCE_DIR}/base/common/lib
COMMAND sed -n "s/^jboss-jaxrs-2.0-api-\\(.*\\)\\.jar\$/\\1/p"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE JAXRS_API_VERSION
)
message("JAXRS_API_VERSION: ${JAXRS_API_VERSION}")

set(JAXRS_API_JAR "${CMAKE_SOURCE_DIR}/lib/jboss-jaxrs-2.0-api-${JAXRS_API_VERSION}.jar")
set(JAXRS_API_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jboss-jaxrs-2.0-api-${JAXRS_API_VERSION}.jar")
set(JAXRS_API_LINK "jboss-jaxrs-2.0-api-${JAXRS_API_VERSION}.jar")

else()
Expand All @@ -35,7 +35,7 @@ else()
/usr/share/java
)
set(JAXRS_API_LINK "../../../..${JAXRS_API_JAR}")
endif (EXISTS "${CMAKE_SOURCE_DIR}/lib")
endif (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")

find_file(SLF4J_API_JAR
NAMES
Expand Down Expand Up @@ -126,33 +126,33 @@ find_file(HTTPCORE_JAR
/usr/share/java
)

if (EXISTS "${CMAKE_SOURCE_DIR}/lib")
if (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")
# use imported JARs

execute_process(
COMMAND ls ${CMAKE_SOURCE_DIR}/lib
COMMAND ls ${CMAKE_SOURCE_DIR}/base/common/lib
COMMAND sed -n "s/^jackson-annotations-\\(.*\\)\\.jar\$/\\1/p"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE JACKSON_VERSION
)
message("JACKSON_VERSION: ${JACKSON_VERSION}")

set(JACKSON_ANNOTATIONS_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-annotations-${JACKSON_VERSION}.jar")
set(JACKSON_ANNOTATIONS_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-annotations-${JACKSON_VERSION}.jar")
set(JACKSON_ANNOTATIONS_LINK "jackson-annotations-${JACKSON_VERSION}.jar")

set(JACKSON_CORE_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-core-${JACKSON_VERSION}.jar")
set(JACKSON_CORE_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-core-${JACKSON_VERSION}.jar")
set(JACKSON_CORE_LINK "jackson-core-${JACKSON_VERSION}.jar")

set(JACKSON_DATABIND_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-databind-${JACKSON_VERSION}.jar")
set(JACKSON_DATABIND_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-databind-${JACKSON_VERSION}.jar")
set(JACKSON_DATABIND_LINK "jackson-databind-${JACKSON_VERSION}.jar")

set(JACKSON_JAXRS_BASE_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-jaxrs-base-${JACKSON_VERSION}.jar")
set(JACKSON_JAXRS_BASE_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-jaxrs-base-${JACKSON_VERSION}.jar")
set(JACKSON_JAXRS_BASE_LINK "jackson-jaxrs-base-${JACKSON_VERSION}.jar")

set(JACKSON_JAXRS_JSON_PROVIDER_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-jaxrs-json-provider-${JACKSON_VERSION}.jar")
set(JACKSON_JAXRS_JSON_PROVIDER_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-jaxrs-json-provider-${JACKSON_VERSION}.jar")
set(JACKSON_JAXRS_JSON_PROVIDER_LINK "jackson-jaxrs-json-provider-${JACKSON_VERSION}.jar")

set(JACKSON_MODULE_JAXB_ANNOTATIONS_JAR "${CMAKE_SOURCE_DIR}/lib/jackson-module-jaxb-annotations-${JACKSON_VERSION}.jar")
set(JACKSON_MODULE_JAXB_ANNOTATIONS_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jackson-module-jaxb-annotations-${JACKSON_VERSION}.jar")
set(JACKSON_MODULE_JAXB_ANNOTATIONS_LINK "jackson-module-jaxb-annotations-${JACKSON_VERSION}.jar")

else()
Expand Down Expand Up @@ -208,7 +208,7 @@ else()
/usr/share/java
)
set(JACKSON_MODULE_JAXB_ANNOTATIONS_LINK "../../../..${JACKSON_MODULE_JAXB_ANNOTATIONS_JAR}")
endif (EXISTS "${CMAKE_SOURCE_DIR}/lib")
endif (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")

execute_process(
COMMAND awk -F= "$1==\"ID\" { print $2 ;}" /etc/os-release
Expand Down Expand Up @@ -267,18 +267,18 @@ find_file(JAVAX_ANNOTATIONS_API_JAR
/usr/share/java
)

if (EXISTS "${CMAKE_SOURCE_DIR}/lib")
if (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")
# use imported JARs

execute_process(
COMMAND ls ${CMAKE_SOURCE_DIR}/lib
COMMAND ls ${CMAKE_SOURCE_DIR}/base/common/lib
COMMAND sed -n "s/^jboss-logging-\\(.*\\)\\.jar\$/\\1/p"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE JBOSS_LOGGING_VERSION
)
message("JBOSS_LOGGING_VERSION: ${JBOSS_LOGGING_VERSION}")

set(JBOSS_LOGGING_JAR "${CMAKE_SOURCE_DIR}/lib/jboss-logging-${JBOSS_LOGGING_VERSION}.jar")
set(JBOSS_LOGGING_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/jboss-logging-${JBOSS_LOGGING_VERSION}.jar")
set(JBOSS_LOGGING_LINK "jboss-logging-${JBOSS_LOGGING_VERSION}.jar")

else()
Expand All @@ -292,7 +292,7 @@ else()
/usr/share/java
)
set(JBOSS_LOGGING_LINK "../../../..${JBOSS_LOGGING_JAR}")
endif (EXISTS "${CMAKE_SOURCE_DIR}/lib")
endif (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")

find_file(JSS_JAR
NAMES
Expand Down Expand Up @@ -359,29 +359,26 @@ find_file(LDAPJDK_JAR
/usr/share/java
)

if (EXISTS "${CMAKE_SOURCE_DIR}/lib")
if (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")
# use imported JARs

execute_process(
COMMAND ls ${CMAKE_SOURCE_DIR}/lib
COMMAND ls ${CMAKE_SOURCE_DIR}/base/common/lib
COMMAND sed -n "s/^resteasy-jaxrs-\\(.*\\)\\.jar\$/\\1/p"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE RESTEASY_VERSION
)
message("RESTEASY_VERSION: ${RESTEASY_VERSION}")

set(RESTEASY_JAXRS_JAR "${CMAKE_SOURCE_DIR}/lib/resteasy-jaxrs-${RESTEASY_VERSION}.jar")
set(RESTEASY_JAXRS_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/resteasy-jaxrs-${RESTEASY_VERSION}.jar")
set(RESTEASY_JAXRS_LINK "resteasy-jaxrs-${RESTEASY_VERSION}.jar")

set(RESTEASY_CLIENT_JAR "${CMAKE_SOURCE_DIR}/lib/resteasy-client-${RESTEASY_VERSION}.jar")
set(RESTEASY_CLIENT_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/resteasy-client-${RESTEASY_VERSION}.jar")
set(RESTEASY_CLIENT_LINK "resteasy-client-${RESTEASY_VERSION}.jar")

set(RESTEASY_JACKSON_PROVIDER_JAR "${CMAKE_SOURCE_DIR}/lib/resteasy-jackson2-provider-${RESTEASY_VERSION}.jar")
set(RESTEASY_JACKSON_PROVIDER_JAR "${CMAKE_SOURCE_DIR}/base/common/lib/resteasy-jackson2-provider-${RESTEASY_VERSION}.jar")
set(RESTEASY_JACKSON_PROVIDER_LINK "resteasy-jackson2-provider-${RESTEASY_VERSION}.jar")

set(RESTEASY_SERVLET_INITIALIZER_JAR "${CMAKE_SOURCE_DIR}/lib/resteasy-servlet-initializer-${RESTEASY_VERSION}.jar")
set(RESTEASY_SERVLET_INITIALIZER_LINK "resteasy-servlet-initializer-${RESTEASY_VERSION}.jar")

else()
# use system JARs

Expand All @@ -408,6 +405,24 @@ else()
/usr/share/java/resteasy
)
set(RESTEASY_JACKSON_PROVIDER_LINK "../../../..${RESTEASY_JACKSON_PROVIDER_JAR}")
endif (EXISTS "${CMAKE_SOURCE_DIR}/base/common/lib")

if (EXISTS "${CMAKE_SOURCE_DIR}/base/server/lib")
# use imported JARs

execute_process(
COMMAND ls ${CMAKE_SOURCE_DIR}/base/server/lib
COMMAND sed -n "s/^resteasy-servlet-initializer-\\(.*\\)\\.jar\$/\\1/p"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE RESTEASY_VERSION
)
message("RESTEASY_VERSION: ${RESTEASY_VERSION}")

set(RESTEASY_SERVLET_INITIALIZER_JAR "${CMAKE_SOURCE_DIR}/base/server/lib/resteasy-servlet-initializer-${RESTEASY_VERSION}.jar")
set(RESTEASY_SERVLET_INITIALIZER_LINK "resteasy-servlet-initializer-${RESTEASY_VERSION}.jar")

else()
# use system JARs

find_file(RESTEASY_SERVLET_INITIALIZER_JAR
NAMES
Expand All @@ -416,7 +431,7 @@ else()
/usr/share/java/resteasy
)
set(RESTEASY_SERVLET_INITIALIZER_LINK "../../../../../..${RESTEASY_SERVLET_INITIALIZER_JAR}")
endif (EXISTS "${CMAKE_SOURCE_DIR}/lib")
endif (EXISTS "${CMAKE_SOURCE_DIR}/base/server/lib")

find_file(JASPIC_API_JAR
NAMES
Expand Down
144 changes: 144 additions & 0 deletions base/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,150 @@

<dependencies>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.32</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.32</version>
</dependency>

<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.6</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.10</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.5</version>
</dependency>

<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>

<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.14.2</version>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
<version>1.0.0.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.4.1.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.26.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.26.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.26.Final</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.jss</groupId>
<artifactId>jss-base</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions base/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-servlet-initializer</artifactId>
<version>3.0.26.Final</version>
</dependency>

</dependencies>

<build>
Expand Down
Loading

0 comments on commit 4b29f9e

Please sign in to comment.