java - 使用适用于 OpenShift 的 Jboss Tools 插件进行部署会生成错误 invalid target release : 1. 8

标签 java eclipse maven openshift

我在项目中使用 JBoss Tools 插件将应用程序部署到 OpenShift。当命令部署构建失败时。按照以下错误日志进行操作:

Stopping jbossews cartridge
Sending SIGTERM to jboss:354331 ...
Stopping MySQL 5.5 cartridge
Stopping PHPMyAdmin cartridge
Waiting for stop to finish
Waiting for stop to finish
Repairing links for 1 deployments
Building git ref 'master', commit 11577ee
Using Maven mirror /var/lib/openshift/56cb57232d5271befc00009a/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml
Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500)
Maven home: /usr/share/java/apache-maven-3.0.4
Java version: 1.7.0_95, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-573.18.1.el6.x86_64", arch: "i386", family: "unix"
Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/56cb57232d5271befc00009a/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml clean package -Popenshift -DskipTests'
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Picos 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ Picos ---
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ Picos ---
[debug] execute contextualize
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Picos ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 102 source files to /var/lib/openshift/56cb57232d5271befc00009a/app-root/runtime/repo/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.770s
[INFO] Finished at: Tue Feb 23 13:43:53 EST 2016
[INFO] Final Memory: 8M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Picos: 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
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/56cb57232d5271befc00009a/jbossews

我在本地使用 java tomcat 8 和 8 来运行我的项目。我认为这与它有关。我应该做什么才能部署 OpenShift?

有人可以帮助我吗?

最佳答案

您需要在本地使用 Java 7 和(可能)Tomcat 7 来开发您的应用程序,以便它与 OpenShift Online 兼容。如果您想继续使用 Java 8,您应该尝试部署到 WildFly 或 JBoss EAP 盒。

关于java - 使用适用于 OpenShift 的 Jboss Tools 插件进行部署会生成错误 invalid target release : 1. 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35586609/

相关文章:

java - 在没有科学记数法的情况下格式化字符串中的 double

java - Maven 无法通过强制身份验证从 HTTPS Nexus 下载 Artifact

c++ - CUDA 6.0 链接错误 : undefined reference to `__cudaUnregisterFatBinary'

c++ - Eclipse C++ dll导入

java - 手动停止 cargo 容器 Tomcat 6.X

maven - 异常发生在测试用例结束时

java - 当我尝试在 Eclipse 中使用 Struts 上传和保存图像文件时,它显示文件名为 null

java - 根据给定的数字数组创建几乎唯一的标识符

Java 类 - 如何将通用对象传递给函数

java - 如何在Java中将控制台重定向到新窗口