You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/toolchain.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ When `jdkToolchain` is configured, the Liberty Maven Plugin uses Maven's toolcha
76
76
- If a matching toolchain is found, the plugin uses that toolchain to determine a `JAVA_HOME` and runs Liberty server commands using that `JAVA_HOME`.
77
77
- If no matching toolchain is found (or `jdkHome` is not available), the plugin logs a warning and runs using the same JDK that is used to run Maven.
78
78
79
-
If `JAVA_HOME` is already set in `server.env` or `jvm.options`, that configuration takes precedence. In that case, the plugin logs a warning and does not apply the toolchain.
79
+
If `JAVA_HOME` is already set in `server.env` or `jvm.options`, or is provided through Maven project properties (for example, `liberty.env.JAVA_HOME` or `jvmOptions` properties), that configuration takes precedence. In that case, the plugin logs a warning and does not apply the toolchain.
80
80
81
81
82
82
###### Dev mode
@@ -107,9 +107,9 @@ Dev mode (`liberty:dev`) uses the configured `jdkToolchain` in two places:
107
107
108
108
Liberty Maven Plugin logs a warning and runs using the same JDK that is used to run Maven.
109
109
110
-
-**`JAVA_HOME` set in `server.env` or `jvm.options`**
110
+
-**`JAVA_HOME` set for the server (`server.env`, `jvm.options`, or Maven project properties)**
111
111
112
-
`JAVA_HOME` takes precedence over the toolchain. Liberty Maven Plugin logs a warning and does not apply the toolchain.
112
+
`JAVA_HOME`configured for the server takes precedence over the toolchain. This includes values set directly in `server.env` or `jvm.options`, as well as values provided through Maven project properties that generate those files (for example, `liberty.env.JAVA_HOME` or `jvmOptions` properties). In these cases, Liberty Maven Plugin logs a warning and does not apply the toolchain.
113
113
114
114
-**Dev mode compilation**
115
115
@@ -136,7 +136,8 @@ Configured toolchain JDK 11 for Liberty Maven Plugin, but added only JDK 17 in t
136
136
**If you see a warning that toolchain is not honored because JAVA_HOME is configured:**
137
137
138
138
- Check `server.env` and `jvm.options` for `JAVA_HOME`.
139
-
- Remove `JAVA_HOME` if you want the toolchain JDK to be used.
139
+
- Check your Maven project properties for values that set `JAVA_HOME`, such as `liberty.env.JAVA_HOME` or `jvmOptions` properties.
140
+
- Remove or adjust these settings if you want the toolchain JDK to be used.
0 commit comments