Jenkins 프로젝트 빌드 중 해당 빌드의 Console Output에서
"JAVA_HOME should point to a JDK not a JRE" 라는 메시지를 보게 되었다.
처음에는 Jenkins 오류겠거니 했는데 로그를 자세히 살펴보니 Maven 오류였다.
www.baeldung.com/maven-java-home-jdk-jre
JAVA_HOME should point to a JDK not a JRE | Baeldung
Learn about the root cause of the Maven error 'JAVA_HOME should point to a JDK not a JRE' and how to resolve it
www.baeldung.com
즉, Maven goal을 실행 시 javac command를 실행할 수 없는 것이다.
나의 경우에는 Jenkins를 docker 컨테이너로 실행하고
Jenkins에 필요한 Maven은 Jenkins > Global Tools Configuration에서 자동 설치받았다.
따라서, Jenkins > Global Tools Configuration > JDK의 JAVA_HOME에
Jenkin 컨테이너 내부의 JAVA_HOME 경로를 입력함으로써 이 문제를 해결했다.
Global Tools Configuration > JDK 에서 자동 설치를 받는 등, 이 문제를 해결하는 더 나은 방법이 있을 것이다.
'웹 개발 > ETC' 카테고리의 다른 글
[Docker] Unable to prepare context (0) | 2021.04.14 |
---|---|
[Jenkins] GitHub Webhook 설정 시 "Polling has not run yet" 메시지 (0) | 2021.03.29 |
MQTT의 추가적인 개념과 구현 (0) | 2020.12.03 |
Kubernetes (0) | 2020.11.24 |
MQTT(Message Queuing Telemetry Transport)의 개념 (0) | 2020.11.07 |