add missing plugin documentation
[maven-build-process.git] / Makefile
blob681adee0093ebeb7ade8d7838aa8cec3cc7e477e
1 # http://www.gnu.org/software/make/manual/make.html
2 # https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html#Makefile-Basics
3 # http://clarkgrubb.com/makefile-style-guide
5 ############
6 # PROLOGUE #
7 ############
8 MAKEFLAGS += --warn-undefined-variables
9 SHELL = /bin/sh
10 .SHELLFLAGS := -eu -o pipefail -c
11 .DEFAULT_GOAL := all
12 .DELETE_ON_ERROR:
13 .SUFFIXES:
15 ######################
16 # INTERNAL VARIABLES #
17 ######################
18 timestamp := $(shell /bin/date "+%Y.%m.%d-%H%M%S")
20 ###############
21 # GOALS/RULES #
22 ###############
24 .PHONY: all
25 all: help
27 #COLORS
28 GREEN := $(shell tput -Txterm setaf 2)
29 WHITE := $(shell tput -Txterm setaf 7)
30 YELLOW := $(shell tput -Txterm setaf 3)
31 RESET := $(shell tput -Txterm sgr0)
33 # Add the following 'help' target to your Makefile
34 # And add help text after each target name starting with '\#\#'
35 # A category can be added with @category
36 HELP_FUN = \
37 %help; \
38 while(<>) { push @{$$help{$$2 // 'targets'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
39 print "usage: make [target]\n\n"; \
40 for (sort keys %help) { \
41 print "${WHITE}$$_:${RESET}\n"; \
42 for (@{$$help{$$_}}) { \
43 $$sep = " " x (32 - length $$_->[0]); \
44 print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
45 }; \
46 print "\n"; }
48 help: ##@other Show this help.
49 @perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
51 .PHONY: display-dependency-updates
52 display-dependency-updates: ## This message will show up when typing 'make help'
53 @mvn versions:display-dependency-updates -U -pl maven-boms -amd
55 .PHONY: display-plugin-updates
56 display-plugin-updates: ## and another message
57 @mvn versions:display-plugin-updates -U -pl maven-parents -amd
59 .PHONY: display-property-updates
60 display-property-updates: ## the third message
61 @mvn versions:display-property-updates -U
63 .PHONY: sonar-analysis
64 sonar-analysis:
65 # http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+Maven
66 @mvn clean install
67 @mvn sonar:sonar -Dsonar.host.url=http://localhost:59000
69 .PHONY: sign-waiver
70 sign-waiver:
71 @gpg2 --no-version --armor --sign AUTHORS/WAIVER
73 .PHONY: release-into-local-nexus
74 release-into-local-nexus:
75 mvn versions:set -DnewVersion=$(timestamp) -DgenerateBackupPoms=false
76 mvn clean deploy scm:tag -Dtag=maven-build-process-$(timestamp) -DpushChanges=false -DskipLocalStaging=true -Drelease=local
77 -mvn versions:set -DnewVersion=0.0.0-SNAPSHOT -DgenerateBackupPoms=false
79 .PHONY: release-into-sonatype-nexus
80 release-into-sonatype-nexus:
81 mvn versions:set -DnewVersion=$(timestamp) -DgenerateBackupPoms=false
82 mvn clean gpg:sign deploy scm:tag -Dtag=maven-build-process-$(timestamp) -DpushChanges=false -Drelease=sonatype
83 -mvn versions:set -DnewVersion=0.0.0-SNAPSHOT -DgenerateBackupPoms=false