Commit cf3e513
committed
fix: support JBP_CONFIG_OPEN_JDK_JRE environment variable
The buildpack was ignoring JBP_CONFIG_OPEN_JDK_JRE (documented in README)
because it was only looking for JBP_CONFIG_OPENJDK (derived from internal
name "openjdk"). This caused version configurations like {jre: {version: 21.+}}
to be silently ignored, falling back to the default Java 17.
Root cause:
- Code constructed env var: JBP_CONFIG_OPENJDK
- Users/docs specified: JBP_CONFIG_OPEN_JDK_JRE
- Mismatch → env var not found → default version used
Fix:
- Check both JBP_CONFIG_OPENJDK and JBP_CONFIG_OPEN_JDK_JRE for OpenJDK
- Maintains backward compatibility (both names work)
- Add debug logging to trace version resolution
- Add comprehensive unit tests for both env var names
Closes: Issue where JBP_CONFIG_OPEN_JDK_JRE was not respected1 parent 39a12b2 commit cf3e513
2 files changed
Lines changed: 64 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
218 | 231 | | |
219 | 232 | | |
220 | 233 | | |
221 | 234 | | |
| 235 | + | |
222 | 236 | | |
223 | 237 | | |
| 238 | + | |
| 239 | + | |
224 | 240 | | |
225 | 241 | | |
226 | 242 | | |
227 | 243 | | |
| 244 | + | |
228 | 245 | | |
229 | 246 | | |
230 | 247 | | |
| 248 | + | |
231 | 249 | | |
232 | 250 | | |
| 251 | + | |
233 | 252 | | |
234 | 253 | | |
235 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
302 | 346 | | |
303 | 347 | | |
304 | 348 | | |
| |||
0 commit comments