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
When migrating a Bamboo build plan that specifies jdk: JDK 17 (or JDK 18 / JDK 19) on a Maven, Ant, or Grails task, the generated workflow emits java-version: '16' instead of java-version: '17'. This causes builds to fail immediately with:
The JDK_VERSION_MAPPING lookup table in lib/valet/transformers/utilities/java.rb (v1.3.22645) contains incorrect mappings for Java 17, 18, and 19:
JDK_VERSION_MAPPING={
...
"16"=>"16","17"=>"16",# should be "17""18"=>"16",# should be "18" (or "17" as the nearest LTS)"19"=>"16",# should be "19" (or "17" as the nearest LTS)}.freeze
Java 17 is an LTS release and has been in mainstream use since September 2021; mapping it to 16 is incorrect. The version() method also falls back to "16" for any unrecognised version, which compounds the problem for future releases.
Alternatively, remove the mapping entirely for versions ≥ 17 and pass the parsed numeric version through verbatim, since actions/setup-java supports all modern Java versions directly.
Workaround
Use --custom-transformers with a Ruby file that overrides the Maven transformer to extract the version directly from the jdk: label string, bypassing JDK_VERSION_MAPPING:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When migrating a Bamboo build plan that specifies
jdk: JDK 17(orJDK 18/JDK 19) on a Maven, Ant, or Grails task, the generated workflow emitsjava-version: '16'instead ofjava-version: '17'. This causes builds to fail immediately with:Root cause
The
JDK_VERSION_MAPPINGlookup table inlib/valet/transformers/utilities/java.rb(v1.3.22645) contains incorrect mappings for Java 17, 18, and 19:Java 17 is an LTS release and has been in mainstream use since September 2021; mapping it to 16 is incorrect. The
version()method also falls back to"16"for any unrecognised version, which compounds the problem for future releases.To reproduce
Bamboo spec (
--source-file-path):Command:
Expected behaviour
Generated workflow contains:
Actual behaviour
Generated workflow contains:
Environment
gh actions-importerversionghcr.io/actions-importer/cli:latest(digestc7996b55b8e2)Suggested fix
Alternatively, remove the mapping entirely for versions ≥ 17 and pass the parsed numeric version through verbatim, since
actions/setup-javasupports all modern Java versions directly.Workaround
Use
--custom-transformerswith a Ruby file that overrides the Maven transformer to extract the version directly from thejdk:label string, bypassingJDK_VERSION_MAPPING:Beta Was this translation helpful? Give feedback.
All reactions