Bamboo Data Center Java Specs is failing with "invalid target release: 17" error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bamboo Java Specs scanning fails with an "invalid target release: 17" error present in the<bamboo-home>/logs/atlassian-bamboo.log
file.
Environment
Issue was observed on Bamboo 10.0.0 but other versions could be affected too.
Diagnosis
The following error can be found in<bamboo-home>/logs/atlassian-bamboo.log
file during the Java Specs scanning execution:
1
27-Sep-2024 11:40:44 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bamboo-specs-generator: Fatal error compiling: invalid target release: 17 -> [Help 1]
Cause
The maven-complier-plugin on the Bamboo server might be configured incorrectly or using an older version that doesn't support Java 17.
Check the version of maven by running the command mvn --version
Solution
Make sure that you upgrade Maven to version 3.8.1 or later which supports Java 17 on the Bamboo server.
You need to update Bamboo server capabilities to point to the new Maven
Was this helpful?