spring boot makefile 예제

임태빈·2022년 8월 7일
0

maven

MY_VAR := $(shell ps -ef | grep java  | grep -v grep | awk '{print $$2}')

clean:
	./mvnw clean

compile:
	./mvnw compile

package:
	./mvnw clean package

dev-play:
	nohup java -jar -Dspring.profiles.active=dev snap-0.0.1-SNAPSHOT.jar 1>/dev/null 2>&1 &

prd-play:
	nohup java -jar -Dspring.profiles.active=prd snap-0.0.1-SNAPSHOT.jar 1>/dev/null 2>&1 &

stop:
	@echo $(MY_VAR)\
	$(shell kill -9 $(MY_VAR))

log:
	tail -f log/logfil.log

gradle

MY_VAR := $(shell ps -ef | grep java  | grep -v grep | awk '{print $$2}')

clean:
	./gradlew clean

compile:
	./gradlew classes

package:
	./gradlew clean build

dev-play:
	nohup java -jar -Dspring.profiles.active=dev snap-0.0.1-SNAPSHOT.jar 1>/dev/null 2>&1 &

prd-play:
	nohup java -jar -Dspring.profiles.active=prd snap-0.0.1-SNAPSHOT.jar 1>/dev/null 2>&1 &

stop:
	@echo $(MY_VAR)\
	$(shell kill -9 $(MY_VAR))

log:
	tail -f log/logfil.log
    
profile
golang과 서버 개발을 하고 있는 개발자입니다.

0개의 댓글