[linux] war파일로 마는법(gradle)

Juno·2023년 1월 4일
0

현재 리눅스 서버에 gradle이 설치되어있지 않은 경우로

sh gradlew build

명령어를 작성하면 /build/libs에 war 파일들이 보관되어 잇다.

test 폴더를 제거하고 war 파일 말고싶을 경우에는

sh gradlew build -x test

입력하면 된다.

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

라는 에러가 나오는 경우에는

JAVA_HOME 경로에 jdk가 설치되어 있지 않은 경우에 나오는 명령어로

unset JAVA_HOME

unset 명령어로 JAVA_HOME 변수를 제거한 뒤, 다시 war로 마는 명령어를 사용하면 된다.

unset : 선언된 변수를 제거하는데 사용한다.

profile
Developer :)

0개의 댓글