Fix: JAVA_HOME directory detection
[releng/global-jjb.git] / releasenotes / notes / Fix-JAVA_HOME-directory-detection-b164f29820d36206.yaml
1 ---
2 prelude: >
3     OpenDaylight jenkins maven jobs with jdk17 and CentOS7 currently fails
4     with a confusing message stating that the JAVA_HOME variable is not
5     correctly set.
6     This can happen in various cases, usually when there is a mismatch
7     between the jdk used by maven and the folder pointed by JAVA_HOME.
8     It appears that openjdk17 is not available with CentOS7 and that
9     the folder indeed does not exist
10 issues:
11   - |
12     Current message (JAVA_HOME variable is not set) is confusing and can lead
13     to erroneous interpretations.
14 fixes:
15   - |
16     Add a folder existence check in related script before propagating
17     JAVA_HOME variable to other scripts.
18     If no folder was found, try to find an approaching solution  and exit in
19     case of failure with a more relevant error message.
20 other:
21   - |
22     Adapt and refactor code consequently to be more agnostic to  distribution
23     and jdk installation specificities
24