Skip to content

Commit d860b30

Browse files
authored
Use java25 (#25)
* Upgrade to Java 25 * Upgrade to owasp dep check 12.1.5 and Java 25
1 parent 5a4a5fc commit d860b30

File tree

4 files changed

+34
-24
lines changed

4 files changed

+34
-24
lines changed

.github/workflows/validate.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: "Validate"
44
on: [pull_request, push]
55

66
env:
7-
JAVA_VERSION: '24'
8-
JAVA_DISTRO: 'jdk.java.net'
7+
JAVA_VERSION: '25'
8+
JAVA_DISTRO: 'oracle.com'
99
MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3'
1010

1111
concurrency:
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
- name: Set up JDK ${{ env.JAVA_VERSION }}
24-
uses: oracle-actions/setup-java@v1.4.0
24+
uses: oracle-actions/setup-java@v1.5.0
2525
with:
2626
website: ${{ env.JAVA_DISTRO }}
2727
release: ${{ env.JAVA_VERSION }}
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v4
3636
- name: Set up JDK ${{ env.JAVA_VERSION }}
37-
uses: oracle-actions/setup-java@v1.4.0
37+
uses: oracle-actions/setup-java@v1.5.0
3838
with:
3939
website: ${{ env.JAVA_DISTRO }}
4040
release: ${{ env.JAVA_VERSION }}
@@ -50,7 +50,7 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v4
5252
- name: Set up JDK ${{ env.JAVA_VERSION }}
53-
uses: oracle-actions/setup-java@v1.4.0
53+
uses: oracle-actions/setup-java@v1.5.0
5454
with:
5555
website: ${{ env.JAVA_DISTRO }}
5656
release: ${{ env.JAVA_VERSION }}
@@ -64,7 +64,7 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v4
6666
- name: Set up JDK ${{ env.JAVA_VERSION }}
67-
uses: oracle-actions/setup-java@v1.4.0
67+
uses: oracle-actions/setup-java@v1.5.0
6868
with:
6969
website: ${{ env.JAVA_DISTRO }}
7070
release: ${{ env.JAVA_VERSION }}
@@ -77,7 +77,7 @@ jobs:
7777
steps:
7878
- uses: actions/checkout@v4
7979
- name: Set up JDK ${{ env.JAVA_VERSION }}
80-
uses: oracle-actions/setup-java@v1.4.0
80+
uses: oracle-actions/setup-java@v1.5.0
8181
with:
8282
website: ${{ env.JAVA_DISTRO }}
8383
release: ${{ env.JAVA_VERSION }}

etc/scripts/owasp-dependency-check.sh

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22
#
3-
# Copyright (c) 2020, 2024 Oracle and/or its affiliates.
3+
# Copyright (c) 2020, 2025 Oracle and/or its affiliates.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -19,14 +19,6 @@ set -o pipefail || true # trace ERR through pipes
1919
set -o errtrace || true # trace ERR through commands and functions
2020
set -o errexit || true # exit the script if any statement returns a non-true return value
2121

22-
on_error(){
23-
CODE="${?}" && \
24-
set +x && \
25-
printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \
26-
"${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}"
27-
}
28-
trap on_error ERR
29-
3022
# Path to this script
3123
if [ -h "${0}" ] ; then
3224
SCRIPT_PATH="$(readlink "${0}")"
@@ -39,10 +31,17 @@ readonly SCRIPT_PATH
3931
# Path to the root of the workspace
4032
# shellcheck disable=SC2046
4133
WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P)
42-
readonly WS_DIR
4334

44-
# shellcheck disable=SC2155
45-
readonly RESULT_FILE=$(mktemp -t XXXdependency-check-result)
35+
on_error(){
36+
CODE="${?}" && \
37+
set +x && \
38+
printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \
39+
"${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}"
40+
}
41+
trap on_error ERR
42+
43+
RESULT_FILE=$(mktemp -t XXXdependency-check-result)
44+
readonly RESULT_FILE
4645

4746
die() { cat "${RESULT_FILE}" ; echo "Dependency report in ${WS_DIR}/target" ; echo "${1}" ; exit 1 ;}
4847

@@ -52,13 +51,24 @@ if [ "${PIPELINE}" = "true" ] ; then
5251
mvn ${MAVEN_ARGS} -f "${WS_DIR}"/pom.xml clean install -DskipTests
5352
fi
5453

54+
# The Sonatype OSS Index analyzer requires authentication
55+
# See https://ossindex.sonatype.org/doc/auth-required
56+
# Set OSS_INDEX_USERNAME and OSS_INDEX_PASSWORD to authenticate.
57+
# Otherwise OSS Index analyzer will be disabled
58+
# And yes, this option uses a lower case i while Username and Password has an upper case I
59+
OSS_INDEX_OPTIONS="-DossindexAnalyzerEnabled=false"
60+
if [ -n "${OSS_INDEX_PASSWORD}" ] && [ -n "${OSS_INDEX_USERNAME}" ]; then
61+
OSS_INDEX_OPTIONS="-DossindexAnalyzerEnabled=true -DossIndexUsername=${OSS_INDEX_USERNAME} -DossIndexPassword=${OSS_INDEX_PASSWORD}"
62+
fi
63+
5564
# Setting NVD_API_KEY is not required but improves behavior of NVD API throttling
5665

5766
# shellcheck disable=SC2086
5867
mvn ${MAVEN_ARGS} -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN org.owasp:dependency-check-maven:aggregate \
5968
-f "${WS_DIR}"/pom.xml \
6069
-Dtop.parent.basedir="${WS_DIR}" \
61-
-Dnvd-api-key="${NVD_API_KEY}" \
70+
-DnvdApiKey="${NVD_API_KEY}" \
71+
${OSS_INDEX_OPTIONS} \
6272
> "${RESULT_FILE}" || die "Error running the Maven command"
6373

6474
grep -i "One or more dependencies were identified with known vulnerabilities" "${RESULT_FILE}" \

incubator/virtual-threads-metrics/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<name>Helidon Labs Incubator - Virtual Threads Metrics</name>
3333

3434
<properties>
35-
<version.java>24</version.java>
36-
<version.lib.asm>9.7.1</version.lib.asm>
35+
<version.java>25</version.java>
36+
<version.lib.asm>9.8</version.lib.asm>
3737
</properties>
3838

3939
<dependencies>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939

4040
<version.lib.checkstyle>10.13.0</version.lib.checkstyle>
4141
<version.plugin.checkstyle>3.3.1</version.plugin.checkstyle>
42-
<version.plugin.dependency-check>12.1.0</version.plugin.dependency-check>
42+
<version.plugin.dependency-check>12.1.5</version.plugin.dependency-check>
4343
<version.plugin.directory>1.0</version.plugin.directory>
4444
<version.plugin.failsafe>3.2.5</version.plugin.failsafe>
45-
<version.plugin.spotbugs>4.8.5.0</version.plugin.spotbugs>
45+
<version.plugin.spotbugs>4.9.6.0</version.plugin.spotbugs>
4646
<version.plugin.findsecbugs>1.13.0</version.plugin.findsecbugs>
4747
<version.plugin.helidon-build-tools>4.0.14</version.plugin.helidon-build-tools>
4848
</properties>

0 commit comments

Comments
 (0)