Bom dia,
estou criando esse post, pois já não mais o que fazer.
Estou com um projeto que utiliza o maven.
Ele estava funcionando normal em um dia… mas no outro dia (sexta-feira passada) já começou a apresentar um erro persistente.
Quando tento dar um “MAVEN INSTALL” no projeto, é gerado a seguinte mensagem:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
C:\Arquivos de programas\Java\jre6…\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.328s
[INFO] Finished at: Mon Apr 04 11:15:43 GMT-03:00 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project PortalContestacao: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Arquivos de programas\Java\jre6…\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] -> [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/MojoFailureException
Se alguem puder me ajuda, já não mais o que fazer. Já reconfigurei as variáveis de ambiente inúmeras vezes, já desinstalei o JDK 6 e instalei várias vezes, já exclui todo o projeto e montei ele novamente importando de uma SVN e erro persiste.
Minhas variáveis de ambiente estão configuradas da seguinte forma:
JAVA_HOME = C:\Arquivos de programas\Java\jdk1.6.0_21
CLASSPATH = .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
PATH = %PATH%;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
Help… =/
Obrigado pela atenção!
Att,
Davidson.
