Bitnami Tomcat Stack을 사용하여 EC2에서 인스턴스를 생성했습니다. 모든 것이 몇 분이면 완벽하게 작동합니다. 그러나 최종 단계에서 응용 프로그램을 배포 할 때 maven이 소스 코드를 컴파일하지 못하고 있습니다. Eventhoug JAVA_HOME이 완벽하게 설정되어있어 아래 오류 로그로 컴파일하는 데 실패했습니다.Bitnami Tomcat Stack Maven 컴파일이 실패합니다.
[email protected]:/mnt/apps/stutzen-backend# echo $JAVA_HOME
/opt/bitnami/java
[email protected]:/mnt/webapps/stutzen-backend# mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ware27 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ ware27 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ware27 ---
[INFO] Compiling 34 source files to /mnt/webapps/stutzen-backend/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
/opt/bitnami/java/../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: 11.245s
[INFO] Finished at: Sun Jul 13 10:37:54 UTC 2014
[INFO] Final Memory: 6M/25M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ware27: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] /opt/bitnami/java/../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
어떻게 처리하나요?
당신의 JAVA_HOME 무엇을 당신이 "/ 옵션/bitnami/자바를 확인 않았다/..? /lib/tools.jar "? bitnami tomcat 스택 javahome 당 –
은/opt/bitnami/java입니다. tools.jar의 올바른 경로는 "/opt/bitnami/java/lib/tools.jar"이지만, "/opt/bitnami/java/../lib/tools.jar"을 선택하는 이유를 이해할 수 없습니다. – arvindwill
당신이 어떤 라인을 가지고 있는지 확인하기 위해 maven 프로파일을 사용하십시오 : $ {java.home} /../ lib/tools.jar –