Unable to build with Bamboo Specs due to error "No compiler is provided in this environment"
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
要約
問題
When Maven is pointing to a Java path that doesn't include compilers, Bamboo specs will not run and will produce an error as described below
20-Jul-2020 15:34:42 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bamboo-specs-generator: Compilation failure
20-Jul-2020 15:34:42 [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
20-Jul-2020 15:34:42 [ERROR] -> [Help 1]
20-Jul-2020 15:34:42 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bamboo-specs-generator: Compilation failure
20-Jul-2020 15:34:42 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?診断
環境
Bamboo Server
Maven
You can confirm what version/location of Java is being used by Maven as in the example below
mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 1.8.0_221, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.15.0-72-generic", arch: "amd64", family: "unix"原因
$JAVA_HOME is not pointing to a path with a JAVA compiler (JDK)
ソリューション
ソリューション
Make sure $JAVA_HOME variable is pointing to a Java JDK path.
この内容はお役に立ちましたか?