forked from ESSICS/ess-css-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean-project-repos.sh
executable file
·88 lines (72 loc) · 2.74 KB
/
clean-project-repos.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
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
#!/bin/bash
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
echo ""
echo "===="
echo "==== JDK used: " $JAVA_HOME
echo "===="
START=$(date +%s)
cd ..
# To start fresh, clean your local repository
# If you have accidentally invoked
# mvn install
# or want to assert that you start over fresh,
# delete the Maven repository:
# rm -rf $HOME/.m2/repository
# rm -rf $HOME/.m2/repository/p2/bundle/osgi/org.csstudio.*
# rm -rf $HOME/.m2/repository/p2/bundle/osgi/org.diirt.*
rm -f ?_*.log
# To reduce maven verbosity
# MAVEN_OPTS = $MAVEN_OPTS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
# MVNOPT="-P !cs-studio-sites,!eclipse-sites -B -DlocalArtifacts=ignore"
MVNOPT="-B -P ess-css-settings,platform-default,csstudio-composite-repo-enable,eclipse-sites"
echo ""
echo "===="
echo "==== BUILDING org.csstudio.ess.product"
echo "===="
(cd org.csstudio.ess.product; time mvn -o $MVNOPT --settings ../ess-css-extra/maven/settings.xml clean) | tee 7_org.csstudio.ess.product.log
echo ""
echo "===="
echo "==== BUILDING org.csstudio.product"
echo "===="
(cd org.csstudio.product; time mvn -o $MVNOPT --settings ../ess-css-extra/maven/settings.xml clean) | tee 6_org.csstudio.product.log
echo ""
echo "===="
echo "==== BUILDING org.csstudio.display.builder"
echo "===="
(cd org.csstudio.display.builder; time mvn -o $MVNOPT --settings ../ess-css-extra/maven/settings.xml -Dcss-repo=file:/Users/claudiorosati/Projects/GitHub/ess-css-extra/ess_css_comp_repo clean) | tee 5_org.csstudio.display.builder.log
echo ""
echo "===="
echo "==== BUILDING cs-studio/applications"
echo "===="
(cd cs-studio/applications; time mvn -o $MVNOPT --settings ../../ess-css-extra/maven/settings.xml clean) | tee 4_cs-studio-applications.log
echo ""
echo "===="
echo "==== BUILDING cs-studio/core"
echo "===="
(cd cs-studio/core; time mvn -o $MVNOPT --settings ../../ess-css-extra/maven/settings.xml clean) | tee 3_cs-studio-core.log
echo ""
echo "===="
echo "==== BUILDING diirt"
echo "===="
(cd diirt; time mvn -o $MVNOPT --settings ../ess-css-extra/maven/settings.xml clean) | tee 2_diirt.log
echo ""
echo "===="
echo "==== BUILDING cs-studio-thirdparty"
echo "===="
(cd cs-studio-thirdparty; time mvn $MVNOPT --settings ../ess-css-extra/maven/settings.xml clean) | tee 1_cs-studio-thirdparty.log
echo ""
echo "===="
echo "==== BUILDING maven-osgi-bundles"
echo "===="
(cd maven-osgi-bundles; time mvn -o $MVNOPT --settings ../ess-css-extra/maven/settings.xml clean) | tee 0_maven-osgi-bundles.log
echo ""
tail ?_*.log
echo ""
# Displaying execution time
DUR=$(echo "$(date +%s) - $START" | bc)
MDUR=`expr $DUR / 60`; \
SDUR=`expr $DUR - 60 \* $MDUR`; \
echo "===="
echo "==== Building took $MDUR minutes and $SDUR seconds."
echo "===="