-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (43 loc) · 1.22 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
49
50
51
52
.DEFAULT_GOAL := help
.PHONY: help run destroy format test
# Prints all available commands
help:
@echo Available targets:
@echo build : Build the application
@echo run : Run the application
@echo destroy : Destroy the containers of the application
@echo restart : Stop and rerun the application
@echo format : Format the source code of the application
@echo compile : Compile the source code
@echo test : Run all unit and integration tests
@echo install : Install the application
@echo site : Generate project site documentation
@echo Usage: make 'target' e.g make build
# Run containers
run:
docker compose up
# Destroy containers for database and app - useful for freeing up ports
destroy:
docker compose down
# Build the server
build:
docker compose build
# Rebuild server and start it: IMPORTANT TO RESTART AFTER CHANGING SOURCE CODE
restart:
make build
make run
# Format the source code
format:
mvn spotless:apply
# Run all unit and integration test
test:
mvn clean test
# Compile source code
compile:
mvn clean compile
# Install the application to be used as dependency for other projects
install:
mvn clean install
# Generate site documentation for source code
site:
mvn clean site