-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1 KB
/
Copy pathMakefile
File metadata and controls
41 lines (32 loc) · 1 KB
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
MVN ?= mvn
.DEFAULT_GOAL := help
.PHONY: build test build-skiptests unit-test clean fmt fmt-check help
build:
$(MVN) clean package
test:
$(MVN) test
build-skiptests:
$(MVN) package -DskipTests -Dmaven.test.skip=true
unit-test:
test -n "$(TEST)" || (echo "TEST is not set. Use 'make unit-test TEST=ClassName'" && exit 1)
$(MVN) -Dtest=$(TEST) test
clean:
$(MVN) clean
.PHONY: fmt
fmt:
$(MVN) $(Q) spotless:apply
.PHONY: fmt-check
fmt-check:
$(MVN) $(Q) -Dspotless.failOnError=true -DskipTests -Dmaven.test.skip=true verify
help:
@echo "Makefile for Maven build"
@echo
@echo "Targets:"
@echo " build Build the project with tests"
@echo " test Run all tests"
@echo " build-skip-tests Build the project without tests"
@echo " unit-test TEST=<name> Run a single unit test class"
@echo " fmt Run spotless"
@echo " fmt-check Run spotless only check"
@echo " clean Remove build artifacts"
@echo " help Show this help"