我有以下.gitlab-ci.yml文件爲我的項目.gitlab-ci.yml - 控制的Java版本用於
image: maven:3-jdk-7
build:
script: "mvn install -B"
與下面的輸出
gitlab-ci-multi-runner 1.0.4 (014aa8c)
WARNING: image is not supported by selected executor and shell
Using Shell executor...
Running on pauloconnell-HP-ZBook-15...
Fetching changes...
....
HEAD is now at 95ddd4f maven settings
....
c8a639e..d881b78 master -> origin/master
Checking out 95ddd4fc as master...
HEAD is now at 95ddd4f... maven settings
$ mvn install -B
開始但隨後出現錯誤,其中Java 8正在用於構建
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.260s
[INFO] Finished at: Mon Apr 04 18:55:47 IST 2016
[INFO] Final Memory: 77M/967M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:apt-maven-plugin:1.0-alpha-5:process (default) on project om-interface-eircom: Unable to locate the apt compiler in:
[ERROR] /usr/lib/jvm/java-8-oracle/jre/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.5 or above and
[ERROR] not a JRE (the com.sun.tools.apt.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
我確實在本地安裝了java 8,但我期待dock呃圖像定義來控制這個。
有人可以建議我怎麼能解決這個問題?