-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.3 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.3 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
42
43
44
45
46
47
48
49
50
51
.PHONY = build
.PHONY += clean
.PHONY += coverage
.PHONY += depend-check
.PHONY += depend-tree
.PHONY += lint
.PHONY += test
MVN_ARGS ?= -ntp
MVN_CMD ?= mvn
#################################################
# Targets
#################################################
default: help
help: ## This message
@echo "===================="
@echo " Available Commands"
@echo "===================="
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
###########
##@ Build
build: ## Create the JAR file
$(MVN_CMD) $(MVN_ARGS) package
clean: ## Cleans up build artifacts
$(MVN_CMD) $(MVN_ARGS) clean
###########
##@ Dependencies
depend-check: ## Checks to make sure all dependencies are used (or declared unused)
$(MVN_CMD) $(MVN_ARGS) dependency:analyze-only
depend-tree: ## Generates dependency reports
$(MVN_CMD) $(MVN_ARGS) dependency:tree
###########
##@ Formatting
lint: ## Check formatting
$(MVN_CMD) $(MVN_ARGS) checkstyle:check
###########
##@ Test
test: ## Run unittests
$(MVN_CMD) $(MVN_ARGS) test
coverage: test ## Generate code coverage reports
$(MVN_CMD) $(MVN_ARGS) jacoco:report
@echo "Details in target/site/jacoco/index.html"