forked from CCI-MIT/XCoLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL.sh
More file actions
executable file
·170 lines (143 loc) · 3.74 KB
/
INSTALL.sh
File metadata and controls
executable file
·170 lines (143 loc) · 3.74 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
# stop script if any build fails
set -e
echo "Running Climate CoLab Development Environment Installer"
# Check Java Version and check if Java is in Path
if type -p java; then
echo "[INFO] Found java executable in PATH"
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo "[INFO] Found java executable in JAVA_HOME"
_java="$JAVA_HOME/bin/java"
else
echo "[ERROR] No Java installation found. Please make sure Java 1.7 is installed and set up in PATH."
exit 0
fi
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo "[INFO] Java Version" "$version"
if [[ "$version" > "1.7" ]]; then
echo "[INFO] Java version is sufficient (>1.7)"
else
echo "[ERROR] Java version is below 1.7. Please make sure Java 1.7 is installed and set up in PATH."
exit 0
fi
fi
#Check MySQL Version
if type -p mysql; then
echo "[INFO] Found mysql executable in PATH"
_mysql=mysql
else
echo "[ERROR] No MySQL installation found. Please make sure MySQL is installed and set up in PATH."
exit 0
fi
if [[ "$_mysql" ]]; then
version=$("$_mysql" --version 2>&1 | awk -F ' ' '{print $5}' | awk -F ',' '{print $1}')
echo "[INFO] MySQL Version" "$version"
if [[ "$version" > "5.6" ]]; then
echo "[INFO] MySQL version is sufficient (>5.6)"
echo "[WARN] If you experience problems with your database please download the correct JDBC driver for your MySQL version from: http://dev.mysql.com/downloads/connector/j/"
else
echo "[ERROR] MySQL version is below 5.6. Please make sure MySQL 5.6 is installed and set up in PATH."
exit 0
fi
fi
#Install and deploy
mvn install -N
cd taglibs
mvn install -N
cd ..
cd themes
mvn install -N
cd ..
cd services
mvn install -N
cd ..
cd portlets
mvn install -N
cd ..
cd hooks
mvn install -N
cd ..
cd layouts
mvn install -N
cd ..
cd services/plansProposalsFacade
mvn install -N
cd ../..
cd microservices
mvn install -N
cd ..
cd microservices/util
mvn install -N
cd ../..
cd microservices/util/xcolab-utils
mvn clean compile package install clean
cd ../../..
cd microservices/clients
mvn install -N
cd ../..
# many clients depend on admin client and members-client -> they need to be installed first
cd microservices/clients/admin-client
mvn clean compile package install clean
cd ../../..
cd microservices/clients/members-client
mvn clean compile package install clean
cd ../../..
cd microservices/clients
for D in *; do
if [ -d "${D}" ]; then
cd $D
pwd
mvn clean compile package install clean
cd ..
fi
done
cd ../..
cd microservices/util/entity-utils
mvn clean compile package install clean
cd ../../..
cd services/plansProposalsFacade/plansProposalsFacade-portlet-service
mvn clean compile package install clean
cd ../../..
cd taglibs/colabJspTags
mvn clean compile package install clean
cd ../..
cd services/plansProposalsFacade/plansProposalsFacade-portlet
mvn clean compile package liferay:deploy -DskipTests=true clean
cd ../../..
cd themes/climatecolab-theme
mvn clean compile liferay:build-css package liferay:deploy clean
cd ../..
cd layouts/climatecolab-layout
mvn clean compile package liferay:deploy clean
cd ../..
cd hooks/climatecolab-hooks
mvn clean compile package liferay:deploy clean
cd ../..
cd portlets
for D in *; do
if [ -d "${D}" ]; then
cd $D
pwd
mvn clean compile package liferay:deploy clean
cd ..
fi
done
cd ..
cd microservices/util/service-utils
mvn clean compile package install clean
cd ../../..
cd microservices/services
mvn install -N
cd ../..
cd microservices/services
for D in *; do
if [ -d "${D}" ]; then
cd $D
pwd
mvn clean compile package install clean
cd ..
fi
done
cd ../..