javac: version cible non valide: 1.8 sur Mac lors de l'exécution de la commande Maven

Je suis en train de lancer l'automatisation de test sur Mac. J'ai installé Maven et java, jdk comme suit:

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

et Maven:

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: /usr/local/Cellar/maven/3.2.5/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

Quand j'ai exécuté Maven commande, j'ai eu cette erreur:

[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: invalid target release: 1.8
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[ERROR] -> [Help 1]

J'ai cherché ici, il y a une solution retenue est: est-ce

sudo cp $JAVA_HOME/lib/tools.jar /Library/Java/Extensions/

J'ai exécuté cette commande, mais rien ne s'est passé! Je ne sais pas quel est le problème.

source d'informationauteur Ragnarsson