-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·130 lines (124 loc) · 12.6 KB
/
build.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
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
PLATFORM_HOME=/opt/mobileum/WS
if [[ -z $2 ]] ; then
PLATFORM_HOME='/opt/mobileum/WS'
else
PLATFORM_HOME=$2
fi
if [ $1 != "-Pdev" ] && [ $1 != "-Pprod" ]
then
echo "incorrect profile"
exit 10;
fi
mvn clean install -DskipTests=true -Dair.check.skip-license=true -Dcheckstyle.skip=true
if [ $? -ne 0 ]
then
exit 10
fi
##temporary fix for copying jars according to profile
if [ $1 == "-Pdev" ]
then
cp ~/.m2/repository/net/java/dev/jets3t/jets3t/0.7.1/jets3t-0.7.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/net/sf/kosmosfs/kfs/0.3/kfs-0.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/commons/commons-math/2.1/commons-math-2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/ST4/4.0.4/ST4-4.0.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/common-mobileum/4.0/common-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/hdfs-mobileum/4.0/hdfs-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/hbase-mobileum/4.0/hbase-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-xc/1.7.1/jackson-xc-1.7.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/tomcat/jasper-runtime/5.5.12/jasper-runtime-5.5.12.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/sun/jersey/jersey-json/1.8/jersey-json-1.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-net/commons-net/1.4.1/commons-net-1.4.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/pig/pig/0.12.0/pig-0.12.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.8.8/jackson-core-asl-1.8.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/xerial/snappy/snappy-java/1.1.1.3/snappy-java-1.1.1.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/hadoop/hadoop-core/1.2.1/hadoop-core-1.2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.7.1/jackson-jaxrs-1.7.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar presto-server/target/presto-server-0.105/plugin/metadata/
elif [ $1 == "-Pprod" ]
then
cp ~/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/net/sf/kosmosfs/kfs/0.3/kfs-0.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/commons/commons-math/2.1/commons-math-2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/ST4/4.0.4/ST4-4.0.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/common-mobileum/4.0/common-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/hdfs-mobileum/4.0/hdfs-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/mobileum/hbase-mobileum/4.0/hbase-mobileum-4.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/hadoop/hadoop-auth/2.2.0/hadoop-auth-2.2.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-daemon/commons-daemon/1.0.13/commons-daemon-1.0.13.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/sun/jersey/jersey-json/1.9/jersey-json-1.9.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/net/java/dev/jets3t/jets3t/0.6.1/jets3t-0.6.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/hadoop/hadoop-annotations/2.2.0/hadoop-annotations-2.2.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/pig/pig/0.12.0/pig-0.12.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-xc/1.8.3/jackson-xc-1.8.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/tomcat/jasper-runtime/5.5.23/jasper-runtime-5.5.23.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.8.8/jackson-core-asl-1.8.8.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/xerial/snappy/snappy-java/1.1.1.3/snappy-java-1.1.1.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/hadoop/hadoop-hdfs/2.2.0/hadoop-hdfs-2.2.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/apache/hadoop/hadoop-common/2.2.0/hadoop-common-2.2.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.8.3/jackson-jaxrs-1.8.3.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar presto-server/target/presto-server-0.105/plugin/metadata/
cp ~/.m2/repository/com/ibm/biginsights/data-compression/ibm-compression/1.0.28/ibm-compression-1.0.28.jar presto-server/target/presto-server-0.105/plugin/metadata/
else
echo "the profile : $1 is not configured"
exit 10
fi
if [ $? -ne 0 ]
then
exit 10
fi
cp -R presto-server/target/presto-server-0.105 $PLATFORM_HOME/
cp -R presto-server/target/etc $PLATFORM_HOME/presto-server-0.105/
cp presto-cli/target/presto-cli-0.105-executable.jar $PLATFORM_HOME/presto-server-0.105/presto
chmod +x $PLATFORM_HOME/presto-server-0.105/presto