【发布时间】:2016-02-09 11:19:18
【问题描述】:
我创建了一个 maven 项目并将其附加到 Bluemix 集成 git 存储库。
我可以使用 spring-boot:run 目标在本地(通过 cmd 或 Spring Tool Suite)构建和运行它。
其他人也可以从 Origin 下载代码并在本地机器上正常运行。
我遇到的问题是通过 Bluemix 的构建和部署功能来构建和部署它。在出现以下错误之前一切似乎都很好:(无效的目标版本:1.8)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project StudyPlaner: 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
我了解这个错误是围绕java install的,解决方法一般是确保在运行程序的机器上正确设置java install和环境变量。但是,我不确定如何在 Bluemix Cloud 中编辑这些值。例如,我是否需要附加 Java 运行时微服务,或者是否有可用的默认 Java 版本?
项目的POM.xml中Java版本设置为1.8。
有什么想法可以推进这个吗?
此外,我们计划继续使用容器,但认为不使用容器进行部署是合乎逻辑的第一步。
【问题讨论】:
标签: java spring maven spring-boot ibm-cloud