我尝试部署在Java EE平台中构建的应用程序。当我运行命令git push heroku master
时,在部署完成时,会生成许多错误。
主要例外是:use -source 7 or higher to enable diamond operator
。
有人对此错误有所了解吗?贝娄是更多的错误信息。 谢谢你,如果你可以帮助我。
[ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run
Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full
debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible
solutions, please read the following articles:
remote: [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
remote:
remote: ! ERROR: Failed to build app with Maven
remote: We're sorry this build is failing! If you can't find the
issue in application code,
remote: please submit a ticket so we can help:
https://help.heroku.com/
remote:
remote: ! Push rejected, failed to compile Java app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to wiidas-jee.
答案 0 :(得分:0)
将以下插件和配置添加到pom.xml
:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
然后运行:
$ git add pom.xml
$ git commit -m "pom.xml"
$ git push heroku master