-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (39 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
JAR = HotelProject-0.0.1-SNAPSHOT.jar
JVD = target/site/index.html
DFLAGS = -it -e DISPLAY=$(shell ipconfig getifaddr en0):0
DIMG = hotel_project
help:
@echo " \
<target> | Description \n\
---------------|------------ \n\
build | Runs \`mvn package\` \n\
update | Pull all dependencies without compiling project \n\
run | Run the jar \n\
docker-build | Build Docker image \n\
docker-run | Run Docker container \n\
clean-db | Delete FinalProject/ for a fresh run \n\
jvd | Generate javadoc and open in browser \n\
"
.PHONY: help
build:
mvn package -Dmaven.test.skip=true
.PHONY: build
update:
mvn dependency:copy-dependencies
.PHONY: update
run:
java -jar target/$(JAR)
.PHONY: run
docker-build:
docker build -t $(DIMG) .
.PHONY: dockerize
docker-run:
docker run $(DFLAGS) $(DIMG) || (echo "Did you run \`xhost \$$(ipconfig getifaddr en0)\` in an xquartz session?" && exit 1)
.PHONY: docker-run
clean-db:
rm -ir FinalProject
.PHONY: clean-db
jvd:
mvn site
open $(JVD)
.PHONY: jvd