forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
132 lines (117 loc) · 4.93 KB
/
build.xml
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
<?xml version="1.0"?>
<!--
# Copyright (c) 2017, Baidu.com, Inc. All Rights Reserved
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.
-->
<project name="palo-fe" default="jar" basedir=".">
<property environment="env" />
<!-- set global properties for this build -->
<property name="libdir" value="${basedir}/../thirdparty/installed/lib/jar"/>
<property name="kudulibdir" value="${basedir}/../thirdparty/installed/lib/jar/kudu-client"/>
<property name="builddir" value="${basedir}/build/"/>
<property name="genjavadir" value="${basedir}/../gensrc/build/java"/>
<property name="outputdir" value="${basedir}/output/"/>
<echo message="${builddir}"/>
<target name="clean">
<delete quiet="true" dir="${builddir}"/>
<delete quiet="true" dir="${outputdir}"/>
</target>
<target name="prepare">
<mkdir dir="${builddir}"/>
<mkdir dir="${builddir}/compile"/>
<mkdir dir="${builddir}/compile/src"/>
<mkdir dir="${builddir}/compile/test"/>
</target>
<target name="gensrc">
<exec executable="make" failonerror="true" >
<arg line="-C ${basedir}/../gensrc" />
</exec>
</target>
<!-- classpath -->
<path id="classpathid">
<pathelement location="${builddir}/compile/src"/>
<fileset dir="${libdir}">
<include name="*.jar" />
</fileset>
<fileset dir="${kudulibdir}">
<include name="*.jar" />
</fileset>
</path>
<!-- compile source files. -->
<target name="compile-src" depends="prepare, gensrc">
<javac executable="${env.JAVA_HOME}/bin/javac" destdir="${builddir}/compile/src" source="1.8" includeantruntime="false" debug="true" failonerror="true" debuglevel="lines,vars,source" encoding="UTF-8">
<classpath refid="classpathid"/>
<src path="src"/>
<src path="${genjavadir}"/>
</javac>
<!-- copy dat file of cup and default log4j2.xml -->
<copy todir="${builddir}/compile/src/com/baidu/palo/analysis">
<fileset dir="${genjavadir}/com/baidu/palo/analysis">
<include name="*.dat"/>
</fileset>
</copy>
<copy todir="${builddir}/compile/src/">
<fileset dir="${basedir}/src/com/baidu/palo/common">
<include name="log4j2.xml"/>
</fileset>
</copy>
</target>
<!-- create the jar file -->
<target name="jar" depends="compile-src">
<jar jarfile="${builddir}/palo-fe.jar">
<fileset dir="${builddir}/compile/src">
<include name="**/*.class" />
<include name="**/*.dat" />
<include name="log4j2.xml"/>
</fileset>
</jar>
</target>
<!-- install fe -->
<target name="install" depends="jar">
<mkdir dir="${outputdir}" />
<mkdir dir="${outputdir}/bin" />
<mkdir dir="${outputdir}/conf" />
<mkdir dir="${outputdir}/lib" />
<mkdir dir="${outputdir}/lib/kudu-client" />
<mkdir dir="${outputdir}/webroot" />
<copy todir="${outputdir}/bin" >
<fileset dir="${basedir}/../bin/" includes="start_fe.sh,stop_fe.sh" />
</copy>
<copy todir="${outputdir}/conf" >
<fileset dir="${basedir}/../conf/" includes="fe.conf" />
</copy>
<copy todir="${outputdir}/lib" >
<fileset dir="${basedir}/../docs/build/" includes="help-resource.zip" />
</copy>
<copy todir="${outputdir}/lib" >
<fileset dir="${builddir}/" includes="palo-fe.jar" />
<fileset dir="${libdir}" includes="*.jar" />
</copy>
<copy todir="${outputdir}/lib/kudu-client" >
<fileset dir="${kudulibdir}/" includes="*.jar"/>
</copy>
<copy todir="${outputdir}/webroot" >
<fileset dir="${basedir}/../webroot/" />
</copy>
</target>
<!-- compile all the test java source files -->
<target name="compile-test" depends="prepare, compile-src">
<javac destdir="${builddir}/compile/test" source="1.8" includeantruntime="false" debug="true" failonerror="true" debuglevel="lines,vars,source">
<classpath refid="classpathid"/>
<src path="test"/>
</javac>
</target>
</project>