-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (40 loc) · 1.48 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
MAKEFLAGS += --warn-undefined-variables
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c
VERSION := 8
WOVN_VERSION := 2.0.0
TARGET_DIR = ${PWD}
MAVEN = docker run -i --rm -v ${TARGET_DIR}:/project -v wovnjava-maven_repo:/root/.m2 -w /project maven:3-jdk-$(VERSION) mvn
WEBSITE_CONFIG_FILE = pom.xml
# WEBSITE_CONFIG_FILE = pom_jitpack.xml
.PHONY: all clean build test start stop build_website build_wovn_java build_wovn_java_and_website restart
all: clean build
clean:
$(MAVEN) clean -f pom.jdk$(VERSION).xml
build:
$(MAVEN) package -f pom.jdk$(VERSION).xml -Dmaven.test.skip
test:
$(MAVEN) test -f pom.jdk$(VERSION).xml
start:
docker-compose -f docker/java$(VERSION)/docker-compose.yml up
stop:
docker-compose -f docker/java$(VERSION)/docker-compose.yml rm -sf
build_website:
$(eval TARGET_DIR := ${PWD}/docker/java$(VERSION)/hello)
rm -rf ${TARGET_DIR}/target
$(MAVEN) clean package -f $(WEBSITE_CONFIG_FILE)
clean_website:
$(eval TARGET_DIR := ${PWD}/docker/java$(VERSION)/hello)
$(MAVEN) clean -f $(WEBSITE_CONFIG_FILE)
build_wovn_java:
make clean
make build
mkdir -p ./docker/java$(VERSION)/hello/src/main/webapp/WEB-INF/lib
rm -rf ./docker/java$(VERSION)/hello/src/main/webapp/WEB-INF/lib/*.jar
cp ./target/wovnjava-$(WOVN_VERSION)*.jar ./docker/java$(VERSION)/hello/src/main/webapp/WEB-INF/lib
make clean
build_wovn_java_and_website:
make build_wovn_java
make build_website
restart:
docker-compose -f docker/java$(VERSION)/docker-compose.yml restart tomcat-jdk8