Skip to content

Commit 7d62726

Browse files
authored
Build Updates (#141)
- CI updated to zulu v8.0.442/v11.0.26/v17.0.4/v21.0.6 - removed maven install/config from GHA workflow and associated shell script - switch GHA from maven to openjdk - updated CI commands to invoke maven w/ mvnw instead of mvn - added .sdkmanrc with initial settings for java as v8.0.442-zulu - added maven-wrapper-plugin v3.3.2 - introduced maven wrapper w/ maven version set to v3.3.9 - add blank .mvn/jvm.config as placeholder - add .mvn/maven.config with checksum/snapshot options and javadoc path to java8 javadoc - updated minimum maven version from v3.8 to v3.9 - download-maven-plugin updated from v1.9.0 to v1.13.0 - exec-maven-plugin updated from v3.3.0 to v3.5.0 - maven-archetype-plugin updated from v3.2.1 to v3.3.1 - maven-checkstyle-plugin updated from v3.4.0 to v3.6.0 - maven-clean-plugin updated from v3.4.0 to v3.4.1 - maven-compiler-plugin updated from v3.13.0 to v3.14.0 - maven-dependency-plugin updated from v3.7.1 to v3.8.1 - maven-deploy-plugin updated from v3.1.2 to v3.1.4 - maven-failsafe-plugin updated from v3.3.1 to v3.5.2 - maven-gpg-plugin updated from v3.2.4 to v3.2.7 - maven-install-plugin updated from v3.1.2 to v3.1.4 - maven-jarsigner-plugin updated from v3.0.0 to v3.1.0 - maven-javadoc-plugin updated from v3.8.0 to v3.11.2 - maven-jxr-plugin updated from v3.4.0 to v3.6.0 - maven-pmd-plugin updated from v3.24.0 to v3.26.0 - maven-project-info-reports-plugin updated from v3.6.2 to v3.9.0 - maven-site-plugin updated from v3.12.1 to v3.21.0 - maven-surefire-plugin updated from v3.3.1 to v3.5.2 - maven-surefire-report-plugin updated from v3.3.1 to v3.5.2 - spotbugs-maven-plugin updated from v4.8.6.2 to v4.8.6.6 - versions-maven-plugin updated from v2.17.1 to v2.18.0 - jts-version updated from v1.19.0 to v1.20.0 - logback updated from v1.3.14 to v1.3.15 - pmd updated from v7.4.0 to v7.11.0 - postgresql-jdbc updated from v42.7.3 to v42.7.5 - slf4j updated from v2.0.13 to v2.0.17 - testcontainers updated from v1.20.1 to v1.20.5 - maven-version-rules.xml updated to include latest rules for ignore dependency versions requiring later versions of Java than v8 Signed-off-by: Phillip Ross <[email protected]>
1 parent 879ea28 commit 7d62726

File tree

10 files changed

+508
-67
lines changed

10 files changed

+508
-67
lines changed

.github/install-sdkman.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
set -euf -o pipefail
44

55
JAVA_VERSION=$1
6-
MAVEN_VERSION=$2
76

87
printf "Installing, configuring, and initializing SDKMAN\n"
98
curl -s "https://get.sdkman.io" | bash
@@ -12,7 +11,4 @@ set +uf
1211
source "${HOME}/.sdkman/bin/sdkman-init.sh"
1312

1413
printf "Installing Azul Zulu JDKs via SDKMAN\n"
15-
sdk i java ${JAVA_VERSION}
16-
17-
printf "Installing Apache Maven via SDKMAN\n"
18-
sdk i maven ${MAVEN_VERSION}
14+
sdk i java "${JAVA_VERSION}"

.github/workflows/main.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-24.04]
14-
jdk_version: [8.0.422-zulu, 11.0.24-zulu, 17.0.12-zulu, 21.0.4-zulu]
15-
maven_version: [3.9.8]
14+
jdk_version: [8.0.442-zulu, 11.0.25-zulu, 17.0.13-zulu, 21.0.5-zulu]
1615
include:
1716
- os: ubuntu-24.04
18-
jdk_version: 8.0.422-zulu
19-
zulu_version: 8.80.0.17
20-
maven_version: 3.9.8
17+
jdk_version: 8.0.442-zulu
18+
zulu_version: 8.84.0.15
2119
maven_deploy: true
2220
docker_build: true
2321
maven_docker_container_image_repo: luminositylabs
24-
maven_docker_container_image_name: maven
25-
maven_docker_container_image_tag: 3.9.8_openjdk-8u422_zulu-alpine-8.80.0.17
26-
name: Build on OS ${{ matrix.os }} with Maven ${{ matrix.maven_version }} using JDK ${{ matrix.jdk_version }}
22+
maven_docker_container_image_name: openjdk
23+
maven_docker_container_image_tag: 8u442_zulu-alpine-8.84.0.15
24+
name: Build on OS ${{ matrix.os }} using JDK ${{ matrix.jdk_version }}
2725
runs-on: ${{ matrix.os }}
2826
env:
2927
MAVEN_PROPS: -Djavadoc.path=`which javadoc`
@@ -39,18 +37,16 @@ jobs:
3937

4038
- name: Install SDKMAN and java environment
4139
run: |
42-
.github/install-sdkman.sh ${{ matrix.jdk_version }} ${{ matrix.maven_version }}
40+
.github/install-sdkman.sh ${{ matrix.jdk_version }}
4341
echo "SDKMAN_DIR=${HOME}/.sdkman" >> $GITHUB_ENV
4442
4543
- name: Add SDKMAN candidate environment variables
4644
run: |
4745
echo "JAVA_HOME=${SDKMAN_DIR}/candidates/java/current" >> $GITHUB_ENV
48-
echo "MAVEN_HOME=${SDKMAN_DIR}/candidates/maven/current" >> $GITHUB_ENV
4946
5047
- name: Add SDKMAN candidate paths to system path
5148
run: |
5249
echo "${JAVA_HOME}/bin" >> $GITHUB_PATH
53-
echo "${MAVEN_HOME}/bin" >> $GITHUB_PATH
5450
5551
- name: Setup Maven repository cache
5652
uses: actions/cache@v4
@@ -66,33 +62,33 @@ jobs:
6662
run: echo "${{ github.ref }}"
6763

6864
- name: List Maven repositories
69-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:list-repositories
65+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:list-repositories
7066

7167
- name: Show Maven dependency tree
72-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:tree
68+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:tree
7369

7470
- name: Show Maven active profiles
75-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:active-profiles
71+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:active-profiles
7672

7773
- name: Show Maven effective POM
78-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:effective-pom
74+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:effective-pom
7975

8076
- name: Maven build/test
81-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} clean install
77+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} clean install
8278

8379
- name: Maven generate site
84-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} site site:stage
80+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} site site:stage
8581

8682
- name: Maven deploy
8783
if: ${{ matrix.maven_deploy && (github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') }}
8884
env:
8985
OSSRHU: ${{ secrets.OSSRHU }}
9086
OSSRHT: ${{ secrets.OSSRHT }}
91-
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} deploy
87+
run: ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} deploy
9288

9389
- name: Docker maven build
9490
if: ${{ matrix.docker_build }}
9591
env:
9692
CBD: /usr/src/build
9793
P: luminositylabs-oss
98-
run: docker container run --rm -i -v "$(pwd)":"${CBD}" -v ${HOME}/.gnupg:/root/.gnupg -v ${P}-${{ matrix.maven_docker_container_image_tag }}-mvn-repo:/root/.m2 -w "${CBD}" ${{ matrix.maven_docker_container_image_repo }}/${{ matrix.maven_docker_container_image_name }}:${{ matrix.maven_docker_container_image_tag }} mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} -Djavadoc.path=/usr/bin/javadoc -Dmaven.integration.test.skip=true dependency:list-repositories dependency:tree help:active-profiles clean install site site:stage
94+
run: docker container run --rm -i -v "$(pwd)":"${CBD}" -v ${HOME}/.gnupg:/root/.gnupg -v ${P}-${{ matrix.maven_docker_container_image_tag }}-mvn-repo:/root/.m2 -w "${CBD}" ${{ matrix.maven_docker_container_image_repo }}/${{ matrix.maven_docker_container_image_name }}:${{ matrix.maven_docker_container_image_tag }} sh -l -c "apk update && apk add -u gnupg && ./mvnw -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} -Djavadoc.path=/usr/bin/javadoc -Dmaven.integration.test.skip=true dependency:list-repositories dependency:tree help:active-profiles clean install site site:stage"

.mvn/jvm.config

Whitespace-only changes.

.mvn/maven.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--strict-checksums
2+
--update-snapshots
3+
-Djavadoc.path=${SDKMAN_DIR}/candidates/java/8.0.442-zulu/bin/javadoc

.mvn/wrapper/maven-wrapper.properties

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

.sdkmanrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Enable auto-env through the sdkman_auto_env config
2+
# Add key=value pairs of SDKs to use below
3+
java=8.0.442-zulu

maven-version-rules.xml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,47 @@
11
<ruleset comparisonMethod="maven"
2-
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
2+
xmlns="https://www.mojohaus.org/VERSIONS/RULE/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="https://www.mojohaus.org/VERSIONS/RULE/2.1.0 https://www.mojohaus.org/versions/versions-model/xsd/rule-2.1.0.xsd">
54
<ignoreVersions>
65
<!-- Exclude milestones, release candidates, alphas, and betas-->
76
<ignoreVersion type="regex">.*[\.-](?i)([M|alpha|beta|rc]).*</ignoreVersion>
87
<!-- Exclude milestones, release candidates, alphas, and betas, and Java7 qualifiers -->
98
<ignoreVersion type="regex">.*\.jre[6-7]</ignoreVersion>
109
</ignoreVersions>
1110
<rules>
12-
<!-- Pin logback version to v1.3.x (v1.4.0+ requires Java11) -->
13-
<rule groupId="ch.qos.logback" comparisonMethod="maven">
11+
<!-- Pin checkstyle version to pre-v10 (v10 requires Java11) -->
12+
<rule groupId="com.puppycrawl.tools" artifactId="checkstyle" comparisonMethod="maven">
1413
<ignoreVersions>
15-
<ignoreVersion type="regex">1\.[4-9]\..*</ignoreVersion>
14+
<ignoreVersion type="regex">10\..*</ignoreVersion>
1615
</ignoreVersions>
1716
</rule>
18-
<!-- Pin checkstyle version to pre-v10 (v10 is requires Java11) -->
19-
<rule groupId="com.puppycrawl.tools" artifactId="checkstyle" comparisonMethod="maven">
17+
<!-- Pin spotbugs version to pre-v4.9.0 (v4.9.0 requires Java11) -->
18+
<rule groupId="com.github.spotbugs" artifactId="spotbugs" comparisonMethod="maven">
2019
<ignoreVersions>
21-
<ignoreVersion type="regex">10\..*</ignoreVersion>
20+
<ignoreVersion type="regex">4\.9\..*</ignoreVersion>
21+
</ignoreVersions>
22+
</rule>
23+
<rule groupId="com.github.spotbugs" artifactId="spotbugs-annotations" comparisonMethod="maven">
24+
<ignoreVersions>
25+
<ignoreVersion type="regex">4\.9\..*</ignoreVersion>
2226
</ignoreVersions>
2327
</rule>
2428
<!-- Pin testng version to 7.5.x (v7.6+ requires Java11) -->
2529
<rule groupId="org.testng" artifactId="testng" comparisonMethod="maven">
2630
<ignoreVersions>
27-
<ignoreVersion type="regex">7\.[6-9].*</ignoreVersion>
28-
<ignoreVersion type="regex">7\.10\..*</ignoreVersion>
31+
<ignoreVersion type="regex">7\.[6-9]\..*</ignoreVersion>
32+
<ignoreVersion type="regex">7\.1[0-1]\..*</ignoreVersion>
33+
</ignoreVersions>
34+
</rule>
35+
<!-- Pin logback version to v1.3.x (v1.4.0+ requires Java11) -->
36+
<rule groupId="ch.qos.logback" comparisonMethod="maven">
37+
<ignoreVersions>
38+
<ignoreVersion type="regex">1\.[4-9]\..*</ignoreVersion>
2939
</ignoreVersions>
3040
</rule>
31-
<!-- Pin git-commit-id-plugin version to final 4.x release version (v5+ requires Java11 -->
32-
<rule groupId="pl.project13.maven" artifactId="git-commit-id-plugin">
41+
<!-- Pin hazendaz directory-maven-plugin to pre 1.2.x versions (v1.2.0+ requires Java11) -->
42+
<rule groupId="com.github.hazendaz.maven" artifactId="directory-maven-plugin" comparisonMethod="maven">
3343
<ignoreVersions>
34-
<ignoreVersion type="regex">4\.9\.9</ignoreVersion>
44+
<ignoreVersion type="regex">1.2\..*</ignoreVersion>
3545
</ignoreVersions>
3646
</rule>
3747
</rules>

0 commit comments

Comments
 (0)