0

对于使用 devops 管道在 Bluemix 上构建的应用程序,我收到以下错误。构建命令是

mvn -B package

并且相同的命令在我的本地服务器上没有问题。

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compilerplugin:3.1:compile (default-compile) on project api: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我的构建管道

我是否缺少管道中的配置步骤?为什么是三角洲?

两个不错的功能:我想命名自定义阶段。如果您删除红色/绿色阶段,我想创建一个新阶段作为模板。

4

1 回答 1

0

在您的构建脚本中尝试将 JAVA_HOME 设置为 Java8 并将其添加到路径中。默认情况下有 Java7。

export JAVA_HOME=$JAVA8_HOME
export PATH="$JAVA_HOME/bin:$PATH"
于 2017-03-29T14:53:23.210 回答