invalid target release 1.8

Ich habe versucht, meine Anwendung auf dem OPENSHIFT bereitzustellen, aber maven kann sie nicht mit Fehler kompilieren:

invalid target release 1.8

my "build" action_hook:

export JAVA_HOME="${OPENSHIFT_DATA_DIR}jdk1.8.0_05"
export PATH=${OPENSHIFT_DATA_DIR}jdk1.8.0_05/bin:$PATH
cd $OPENSHIFT_REPO_DIR
java -version
mvn package -s .openshift/settings.xml -DskipTests=true

ERGEBNI

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
[devlt-chernihiv.rhcloud.com repo]\> mvn package -s .openshift/settings.xml -DskipTests=true
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building LaserTag 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sector ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ sector ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /var/lib/openshift/5601634589f5cfa11000006a/app-root/runtime/repo/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.018s
[INFO] Finished at: Tue Sep 22 11:27:06 EDT 2015
[INFO] Final Memory: 10M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sector: 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

dann benutze ich dieses Skript und sehe das Problem:

export JAVA_HOME=${OPENSHIFT_DATA_DIR}jdk1.8.0_05
export PATH=${OPENSHIFT_DATA_DIR}jdk1.8.0_05/bin:$PATH
java -version

java version "1.8.0_05"

Java (TM) SE-Laufzeitumgebung (Build 1.8.0_05-b13)

Java HotSpot (TM) 64-Bit-Server-VM (Build 25.5-b02, gemischter Modus)

mvn --version | grep 'Java home'

Java-Startseite: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85/jr

Java-Startseite wurde geändert, aber Maven ignorieren neue Java-Startseite. Bitte helfen Sie.

Antworten auf die Frage(6)

Ihre Antwort auf die Frage