Skip to content

Commit

Permalink
Update POM files
Browse files Browse the repository at this point in the history
The POM files have been modified to use the latest dependencies.
The dependencies have been moved into the modules that actually
need them. The maven-surefire-plugin has been added to run JUnit
5 tests properly. A new POM file has also been added for EST.

The RPM spec and Azure pipelines have been updated to use the
same dependencies as in the POM files.
  • Loading branch information
edewata committed Jun 27, 2023
1 parent 5c385bc commit 090162f
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 39 deletions.
32 changes: 24 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,47 +63,63 @@ jobs:
- script: |
# get Python <major>.<minor> version
docker exec runner python3 --version | tee output
VERSION=$(sed 's/Python \([0-9]\+\.[0-9]\+\)\..*/\1/' output)
PYTHON_VERSION=$(sed 's/Python \([0-9]\+\.[0-9]\+\)\..*/\1/' output)
docker exec runner \
/root/src/build.sh \
--work-dir=/root/build \
--python-dir=/usr/lib/python$VERSION/site-packages \
--python-dir=/usr/lib/python$PYTHON_VERSION/site-packages \
dist
displayName: Build PKI with CMake
- script: |
# get JSS <major>.<minor>.<update> version
docker exec runner rpm -q dogtag-jss | tee output
JSS_VERSION=$(sed -e 's/^dogtag-jss-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' output)
# if built by COPR, jss-base.jar will be installed in /usr/lib/java/jss,
# otherwise it will be in /usr/share/java/jss.
JSS_BASE_JAR=$(docker exec runner find /usr/share/java/jss /usr/lib/java/jss -name jss-base.jar)
docker exec runner \
mvn install:install-file \
-f /root/src \
-Dfile=/usr/lib/java/jss.jar \
-Dfile=$JSS_BASE_JAR \
-DgroupId=org.dogtagpki.jss \
-DartifactId=jss-base \
-Dversion=5.4.0-SNAPSHOT \
-Dversion=$JSS_VERSION-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
displayName: Install JSS into Maven repo
- script: |
# get Tomcat JSS <major>.<minor>.<update> version
docker exec runner rpm -q dogtag-tomcatjss | tee output
TOMCATJSS_VERSION=$(sed -e 's/^dogtag-tomcatjss-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' output)
docker exec runner \
mvn install:install-file \
-f /root/src \
-Dfile=/usr/share/java/tomcatjss.jar \
-Dfile=/usr/share/java/tomcatjss/tomcatjss-core.jar \
-DgroupId=org.dogtagpki.tomcatjss \
-DartifactId=tomcatjss-tomcat-9.0 \
-Dversion=8.4.0-SNAPSHOT \
-DartifactId=tomcatjss-core \
-Dversion=$TOMCATJSS_VERSION-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
displayName: Install Tomcat JSS into Maven repo
- script: |
# get LDAP JDK <major>.<minor>.<update> version
docker exec runner rpm -q dogtag-ldapjdk | tee output
LDAPJDK_VERSION=$(sed -e 's/^dogtag-ldapjdk-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' output)
docker exec runner \
mvn install:install-file \
-f /root/src \
-Dfile=/usr/share/java/ldapjdk.jar \
-DgroupId=org.dogtagpki.ldap-sdk \
-DartifactId=ldapjdk \
-Dversion=5.4.0-SNAPSHOT \
-Dversion=$LDAPJDK_VERSION-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
displayName: Install LDAP JDK into Maven repo
Expand Down
16 changes: 16 additions & 0 deletions base/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
<artifactId>pki-common</artifactId>
<packaging>jar</packaging>

<dependencies>

<dependency>
<groupId>org.dogtagpki.jss</groupId>
<artifactId>jss-base</artifactId>
<version>5.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.ldap-sdk</groupId>
<artifactId>ldapjdk</artifactId>
<version>5.5.0-SNAPSHOT</version>
</dependency>

</dependencies>

<build>
<finalName>pki-common</finalName>
</build>
Expand Down
31 changes: 31 additions & 0 deletions base/est/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.dogtagpki.pki</groupId>
<artifactId>pki-base-parent</artifactId>
<version>${revision}</version>
</parent>

<artifactId>pki-est</artifactId>
<packaging>jar</packaging>

<dependencies>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pki-server</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

<build>
<finalName>pki-est</finalName>
</build>

</project>
1 change: 1 addition & 0 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<module>tks</module>
<module>tps</module>
<module>acme</module>
<module>est</module>
</modules>

</project>
6 changes: 6 additions & 0 deletions base/tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<version>9.0.50</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.tomcatjss</groupId>
<artifactId>tomcatjss-core</artifactId>
<version>8.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pki-common</artifactId>
Expand Down
15 changes: 8 additions & 7 deletions pki.spec
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(commons-logging:commons-logging)
BuildRequires: mvn(commons-net:commons-net)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-jdk14)
BuildRequires: mvn(xml-apis:xml-apis)
BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
BuildRequires: mvn(org.jboss.resteasy:resteasy-client)
BuildRequires: mvn(org.jboss.resteasy:resteasy-jackson2-provider)
Expand All @@ -177,9 +178,9 @@ BuildRequires: mvn(org.apache.tomcat:tomcat-catalina)
BuildRequires: mvn(org.apache.tomcat:tomcat-servlet-api)
BuildRequires: mvn(org.apache.tomcat:tomcat-jaspic-api)
BuildRequires: mvn(org.apache.tomcat:tomcat-util-scan)
BuildRequires: jss >= 5.4
BuildRequires: tomcatjss >= 8.4
BuildRequires: ldapjdk >= 5.4
BuildRequires: mvn(org.dogtagpki.jss:jss-base) >= 5.5.0
BuildRequires: mvn(org.dogtagpki.tomcatjss:tomcatjss-core) >= 8.5.0
BuildRequires: mvn(org.dogtagpki.ldap-sdk:ldapjdk) >= 5.5.0

# Python build dependencies
BuildRequires: python3 >= 3.9
Expand Down Expand Up @@ -374,8 +375,8 @@ Requires: mvn(org.slf4j:slf4j-jdk14)
Requires: mvn(org.jboss.resteasy:resteasy-client)
Requires: mvn(org.jboss.resteasy:resteasy-jackson2-provider)
Requires: mvn(org.jboss.resteasy:resteasy-jaxrs)
Requires: jss >= 5.4
Requires: ldapjdk >= 5.4
Requires: mvn(org.dogtagpki.jss:jss-base) >= 5.5.0
Requires: mvn(org.dogtagpki.ldap-sdk:ldapjdk) >= 5.5.0
Requires: %{product_id}-base = %{version}-%{release}

%description -n %{product_id}-java
Expand Down Expand Up @@ -440,12 +441,12 @@ Requires: selinux-policy-targeted >= 3.13.1-159

Requires: mvn(org.jboss.resteasy:resteasy-servlet-initializer)
Requires: tomcat >= 1:9.0.50
Requires: mvn(org.dogtagpki.tomcatjss:tomcatjss-core) >= 8.5.0

Requires: systemd
Requires(post): systemd-units
Requires(postun): systemd-units
Requires(pre): shadow-utils
Requires: tomcatjss >= 8.4

# pki-healthcheck depends on the following library
%if 0%{?rhel}
Expand Down
29 changes: 5 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<version>1.15</version>
</dependency>

<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down Expand Up @@ -176,24 +170,6 @@
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.jss</groupId>
<artifactId>jss-base</artifactId>
<version>5.4.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.tomcatjss</groupId>
<artifactId>tomcatjss-tomcat-9.0</artifactId>
<version>8.4.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.dogtagpki.ldap-sdk</groupId>
<artifactId>ldapjdk</artifactId>
<version>5.4.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down Expand Up @@ -252,6 +228,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 090162f

Please sign in to comment.