File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ fixes :
3+ - |
4+ Pin CLM Maven Plugin to version 2.54.1-02 to address compatibility
5+ issues when using Java versions lower than 17. Use latest plugin
6+ version when using Java 17 or higher.
Original file line number Diff line number Diff line change @@ -19,9 +19,19 @@ set +u
1919
2020export MAVEN_OPTS
2121
22+ # Determine CLM plugin version based on Java version
23+ JAVA_VERSION=$( java -version 2>&1 | grep -i version | head -n 1 \
24+ | sed ' s/.*version "\(.*\)".*/\1/' | cut -d' .' -f1 | sed ' s/^1\.//' )
25+
26+ CLM_PLUGIN_VERSION=' ' # Leave empty to use latest version by default
27+
28+ if [[ " $JAVA_VERSION " -lt 17 ]]; then
29+ CLM_PLUGIN_VERSION=" 2.54.1-02"
30+ fi
31+
2232# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
2333# shellcheck disable=SC2086
24- $MVN $MAVEN_GOALS dependency:tree com.sonatype.clm:clm-maven-plugin:index \
34+ $MVN $MAVEN_GOALS dependency:tree com.sonatype.clm:clm-maven-plugin:${CLM_PLUGIN_VERSION} : index \
2535 --global-settings " $GLOBAL_SETTINGS_FILE " \
2636 --settings " $SETTINGS_FILE " \
2737 -DaltDeploymentRepository=staging::file:" $WORKSPACE " /m2repo \
You can’t perform that action at this time.
0 commit comments