-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathqmv.sh
executable file
·52 lines (44 loc) · 1.72 KB
/
qmv.sh
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
#! /bin/bash
# Compile all of the Sakai source in the right order
#
# A good way to do this is:
#
# rm -rf ~/.m2/repository/org/sakaiproject
# bash qmv.sh | tee /tmp/qmv.out
#
# This way you get a log of what happens and figure out any loose
# linkage or sloppy dependencies.
#
# Here is a good command to run on the log:
#
# egrep 'Downloading.*\/sakaiproject|====' /tmp/qmv.out | grep -v plugins | sed 's/.*Downloading/Downloading/'
#
# This will show you which bits of the final compile were downloaded instead of compiled
# You should see none # if we are generating all the binary artifacts from source and things are
# pointing to the right versions.
if [ "$BASH" = "" ] ;then echo "Please run with bash"; exit 1; fi
source config-dist.sh
if [ "$PORT" == "" ]; then
echo "Bad configuration or wrong shell";
exit
fi
goals='clean install sakai:deploy'
if [ $# != 0 ] ; then
goals="$@"
fi
mywd=`pwd`
tomcatdir=$mywd/apache-tomcat-$TOMCAT/
echo Compile Sakai from $mywd to $tomcatdir
cd "$mywd/trunk"
export MAVEN_OPTS='-Xms512m -Xmx1024m -Djava.util.Arrays.useLegacyMergeSort=true'
# Certificates expired :)
export MAVEN_OPTS='-Xms512m -Xmx1024m -Dmaven.wagon.http.ssl.ignore.validity.dates=true -Dmaven.wagon.http.ssl.insecure=true -Djava.util.Arrays.useLegacyMergeSort=true'
if [[ "$THREADS" > 1 ]] ; then
echo Compiling with $THREADS threads
mvn -T $THREADS -e -Dmaven.test.skip=true -Dmaven.tomcat.home=$tomcatdir -Dsakai.cleanup=true $goals
else
echo Compiling with 1 thread
# Given how we register log4j - even 1 thread parallel messes up
# mvn -T 1 -e -Dmaven.test.skip=true -Dmaven.tomcat.home=$tomcatdir $goals
mvn -e -Dmaven.test.skip=true -Dmaven.tomcat.home=$tomcatdir -Dsakai.cleanup=true $goals
fi