forked from apache/tomee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (69 loc) · 3.73 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is used during development only.
# It has just some handy shortcuts.
TOMEE_VERSION=1.5.1
TOMCAT_ZIP_NAME=apache-tomcat-7.0.33
TOMCAT_ZIP=tomee/apache-tomcat/target/$(TOMCAT_ZIP_NAME)-SNAPSHOT.zip
TOMEEPLUS_WAR=tomee/tomee-plus-webapp/target/tomee-plus-webapp-$(TOMEE_VERSION).war
TOMEE_WAR=/home/tveronezi/dev/ws/openejb/trunk/tomee/tomee-webapp/target/tomee-webapp-$(TOMEE_VERSION).war
TOMEEPLUS_ZIP=tomee/apache-tomee/target/apache-tomee-plus-$(TOMEE_VERSION).tar.gz
$(TOMEE_WAR):
cd tomee/tomee-webapp/ && mvn clean install -DskipTests=true
$(TOMEEPLUS_WAR): $(TOMEE_WAR)
cd tomee/tomee-plus-webapp/ && mvn clean install -DskipTests=true
$(TOMCAT_ZIP):
cd tomee/apache-tomcat && mvn clean install
tomcat: $(TOMCAT_ZIP)
tomee: tomcat $(TOMEEPLUS_WAR)
kill-tomee:
@if test -f target/runnner/tomcat-pid.txt; then \
kill -9 `cat target/runnner/tomcat-pid.txt`; \
rm target/runnner/tomcat-pid.txt; \
fi
start-plus: kill-tomee tomee
mkdir -p target/runnner
cp $(TOMEEPLUS_ZIP) target/runnner/
rm -Rf target/runnner/apache-tomee-plus-$(TOMEE_VERSION)
cd target/runnner/ && tar -xvzf apache-tomee-plus-$(TOMEE_VERSION).tar.gz
rm target/runnner/apache-tomee-plus-$(TOMEE_VERSION)/conf/tomcat-users.xml
cp tomee/tomee-webapp/src/test/conf/tomcat-users.xml target/runnner/apache-tomee-plus-$(TOMEE_VERSION)/conf/
export JPDA_SUSPEND=n && export CATALINA_PID=target/runnner/tomcat-pid.txt && ./target/runnner/apache-tomee-plus-$(TOMEE_VERSION)/bin/catalina.sh jpda start
start-tomee: kill-tomee tomee
mkdir -p target/runnner
cp $(TOMCAT_ZIP) target/runnner/
rm -Rf target/runnner/$(TOMCAT_ZIP_NAME)
cd target/runnner/ && unzip $(TOMCAT_ZIP_NAME)-SNAPSHOT.zip
cp tomee/tomee-plus-webapp/target/tomee-plus-webapp-$(TOMEE_VERSION).war \
target/runnner/$(TOMCAT_ZIP_NAME)/webapps/
rm target/runnner/apache-tomcat-7.0.33/conf/tomcat-users.xml
cp tomee/tomee-webapp/src/test/conf/tomcat-users.xml target/runnner/apache-tomcat-7.0.33/conf/
chmod +x target/runnner/$(TOMCAT_ZIP_NAME)/bin/startup.sh
chmod +x target/runnner/apache-tomcat-7.0.33/bin/catalina.sh
export JPDA_SUSPEND=n && export CATALINA_PID=target/runnner/tomcat-pid.txt && ./target/runnner/$(TOMCAT_ZIP_NAME)/bin/catalina.sh jpda start
reload-tomee: kill-tomee
chmod +x target/runnner/$(TOMCAT_ZIP_NAME)/bin/startup.sh
chmod +x target/runnner/apache-tomcat-7.0.33/bin/catalina.sh
export CATALINA_PID=target/runnner/tomcat-pid.txt && ./target/runnner/$(TOMCAT_ZIP_NAME)/bin/catalina.sh jpda start
up-static:
rm -Rf target/runnner/$(TOMCAT_ZIP_NAME)/webapps/tomee-plus-webapp-$(TOMEE_VERSION)/app
cp -r tomee/tomee-webapp/src/main/webapp/app target/runnner/$(TOMCAT_ZIP_NAME)/webapps/tomee-plus-webapp-$(TOMEE_VERSION)/
install-tomee: $(TOMCAT_ZIP)
cd tomee && mvn clean install -DskipTests=true
install-all:
mvn clean && mvn install -DskipTests=true
run-lint:
cd ./tomee/tomee-webapp/ && mvn jslint4java:lint
.PHONY: install-all install-tomee tomcat tomee start-tomee reload-tomee kill-tomee up-static run-lint