|
| 1 | +--- |
| 2 | +name: updating-jvm-versions |
| 3 | +description: Updates bundled JVM versions in docker-setup.sh using Eclipse Temurin lifecycle data. Use when updating JDK versions, checking EOL status, or managing Java runtime versions. |
| 4 | +--- |
| 5 | + |
| 6 | +# Updating JVM Versions |
| 7 | + |
| 8 | +Updates the bundled JVM versions in `bin/docker-setup.sh` using Eclipse Temurin end-of-life data. |
| 9 | + |
| 10 | +## Files |
| 11 | + |
| 12 | +- `bin/docker-setup.sh` - Contains the JVM version loop that pre-installs JDKs via Coursier |
| 13 | + |
| 14 | +## Workflow |
| 15 | + |
| 16 | +1. **Check current versions** in `bin/docker-setup.sh`: |
| 17 | + ```bash |
| 18 | + grep "JVM_VERSION" bin/docker-setup.sh |
| 19 | + ``` |
| 20 | + |
| 21 | +2. **Fetch Eclipse Temurin lifecycle data**: |
| 22 | + ```bash |
| 23 | + curl -s https://endoflife.date/api/v1/products/eclipse-temurin/ | jq '.result.releases' |
| 24 | + ``` |
| 25 | + |
| 26 | +3. **Identify active LTS versions** - Filter for `isLts: true` and `isEol: false`: |
| 27 | + ```bash |
| 28 | + curl -s https://endoflife.date/api/v1/products/eclipse-temurin/ | \ |
| 29 | + jq -r '.result.releases[] | select(.isLts == true and .isEol == false) | "\(.name) - EOL: \(.eolFrom)"' |
| 30 | + ``` |
| 31 | + |
| 32 | +4. **Update docker-setup.sh** - Edit the `JVM_VERSION` loop with current LTS versions |
| 33 | + |
| 34 | +## API Reference |
| 35 | + |
| 36 | +**Endpoint**: `https://endoflife.date/api/v1/products/eclipse-temurin/` |
| 37 | + |
| 38 | +**Key fields per release**: |
| 39 | +| Field | Description | |
| 40 | +|-------|-------------| |
| 41 | +| `name` | Major version (e.g., "21", "17", "11", "8") | |
| 42 | +| `isLts` | Whether this is a Long-Term Support release | |
| 43 | +| `isEol` | Whether security support has ended | |
| 44 | +| `eolFrom` | Date when EOL begins | |
| 45 | +| `isMaintained` | Whether actively receiving updates | |
| 46 | +| `latest.name` | Latest patch version available | |
| 47 | + |
| 48 | +## Guidelines |
| 49 | + |
| 50 | +- Only include **LTS versions** that are **not EOL** (`isLts: true` AND `isEol: false`) |
| 51 | +- Order versions from newest to oldest (e.g., `25 21 17 11 8`) |
| 52 | +- Drop versions once `isEol` becomes `true` |
| 53 | +- Consider adding new LTS versions when `isLts` and `isMaintained` are both `true` |
0 commit comments