-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
182 lines (162 loc) · 7.54 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
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
171
172
173
174
175
176
177
178
179
180
181
182
<project name="P-Grid" default="jar" basedir=".">
<description>P-Grid ant build file</description>
<!-- set global properties for this build -->
<property name="bin" location="bin"/>
<property name="classes" location="classes"/>
<property name="docs" location="docs"/>
<property name="jarfile" value="p-grid.jar"/>
<property name="javadoc" location="${docs}/api"/>
<property name="lib" location="lib"/>
<property name="licenses" location="licenses"/>
<property name="release" location="release"/>
<property name="resources" location="resources"/>
<property name="mgrid-resources" location="resources/conf"/>
<property name="src" location="src"/>
<property name="build_src" location="build_src"/>
<property name="major_version" value="v3.2"/>
<property name="minor_version" value="v3.2.0"/>
<path id="class.path">
<pathelement location="${lib}/getopt.jar"/>
<pathelement location="${lib}/h2.jar"/>
<pathelement location="${lib}/NBench.jar"/>
<pathelement location="${lib}/proxool-0.9.1.jar"/>
<pathelement location="${lib}/proxool-cglib.jar"/>
<pathelement location="${lib}/commons-configuration-1.6.jar"/>
<pathelement location="${lib}/commons-lang3-3.1.jar"/>
<pathelement location="${lib}/commons-lang-2.5.jar"/>
<pathelement location="${lib}/commons-logging-1.1.1.jar"/>
<pathelement location="${lib}/core-0.2.jar"/>
<pathelement location="${lib}/guava-11.0.2.jar"/>
<pathelement location="${lib}/hadoop-core-1.2.1.jar"/>
<pathelement location="${lib}/hbase-0.94.10.jar"/>
<pathelement location="${lib}/log4j-1.2.16.jar"/>
<pathelement location="${lib}/protobuf-java-2.4.0a.jar"/>
<pathelement location="${lib}/slf4j-api-1.4.3.jar"/>
<pathelement location="${lib}/slf4j-log4j12-1.4.3.jar"/>
<pathelement location="${lib}/zookeeper-3.4.5.jar"/>
</path>
<mkdir dir="${build_src}"/>
<copy todir="${build_src}" filtering="true">
<fileset dir="${src}"/>
</copy>
<target name="compile" description="compile the source">
<tstamp/>
<mkdir dir="${classes}"/>
<!-- Compile the java code from ${src} into ${classes} -->
<javac srcdir="${build_src}" destdir="${classes}" debug="on" optimize="off" target="1.7" source="1.7">
<classpath refid="class.path"/>
</javac>
</target>
<target name="jar" depends="compile,cleanTmpFolder" description="generate the jar archive">
<!-- Put everything in ${classes} into the ${jarfile} file -->
<jar destfile="${jarfile}">
<fileset dir="${resources}" includes="antilogTable.dat"/>
<fileset dir="${resources}" includes="logTable.dat"/>
<fileset dir="${resources}" includes="P-Grid.ddl"/>
<fileset dir="${resources}" includes="PGridTree.dat"/>
<fileset dir="${resources}" includes="PGridTree.ini"/>
<fileset dir="${resources}" includes="MessageMapping.xml"/>
<fileset dir="${resources}" includes="proxool.properties"/>
<fileset dir="${mgrid-resources}" includes="core-site.xml"/>
<fileset dir="${mgrid-resources}" includes="hbase-site.xml"/>
<fileset dir="${mgrid-resources}" includes="hdfs-site.xml"/>
<fileset dir="${mgrid-resources}" includes="masters"/>
<fileset dir="${mgrid-resources}" includes="regionservers"/>
<fileset dir="${mgrid-resources}" includes="slaves"/>
<!--<echo>Copying planetlab resources</echo>-->
<fileset dir="${classes}" includes="p2p/**"/>
<fileset dir="${classes}" includes="pgrid/**"/>
<fileset dir="${classes}" includes="test/**"/>
<fileset dir="${classes}" includes="mgrid/**"/>
<manifest>
<attribute name="Main-Class" value="pgrid.PGridServer"/>
<attribute name="Created-By" value="${TODAY} (${user.name})"/>
<attribute name="Version" value="${major_version} (${minor_version})"/>
<attribute name="SVN-URL" value="${url.property}"/>
<attribute name="Class-Path" value="
lib/getopt.jar
lib/h2.jar
lib/NBench.jar
lib/proxool-0.9.1.jar
lib/proxool-cglib.jar
lib/commons-logging.jar
lib/getopt.jar
lib/h2.jar
lib/NBench.jar
lib/proxool-0.9.1.jar
lib/proxool-cglib.jar
lib/commons-logging.jar
lib/commons-configuration-1.6.jar
lib/commons-lang3-3.1.jar
lib/commons-lang-2.5.jar
lib/commons-logging-1.1.1.jar
lib/core-0.2.jar
lib/guava-11.0.2.jar
lib/hadoop-core-1.2.1.jar
lib/hbase-0.94.10.jar
lib/log4j-1.2.16.jar
lib/protobuf-java-2.4.0a.jar
lib/slf4j-api-1.4.3.jar
lib/slf4j-log4j12-1.4.3.jar
lib/zookeeper-3.4.5.jar
resources/conf/core-site.xml
resources/conf/hbase-site.xml
resources/conf/hdfs-site.xml
resources/conf/masters
resources/conf/regionservers
resources/conf/slaves
"/>
</manifest>
</jar>
</target>
<target name="exec" depends="jar" description="generate the executable distribution">
<mkdir dir="${release}"/>
<delete file="${release}/P-Grid_${minor_version}.zip"/>
<zip zipfile="${release}/P-Grid_${minor_version}.zip">
<zipfileset prefix="P-Grid" dir="." includes="${jarfile} README changelog.txt release_notes.txt"/>
<zipfileset prefix="P-Grid" dir="${bin}" includes="*.bat *.sh"/>
<zipfileset prefix="P-Grid/lib" dir="${lib}" includes="**"/>
<zipfileset prefix="P-Grid/licenses" dir="${licenses}" includes="*"/>
</zip>
</target>
<target name="javadoc" description="generate the JavaDoc">
<mkdir dir="${javadoc}"/>
<!-- Create the JavaDoc -->
<javadoc packagenames="p2p.*,pgrid.*,test.*,mgrid.*" excludepackagenames="test.planetlab" sourcepath="${src}" destdir="${javadoc}" use="true" splitindex="true" windowtitle="P-Grid ${major_version} API Specification">
<classpath refid="class.path"/>
<doctitle>P-Grid ${major_version} API Specification</doctitle>
<header>P-Grid ${major_version} API Specification</header>
<bottom>This is open source software distributed under the terms of the GNU General Public License, a copy of which is included in the file LICENSE. If not you can find the GPL at http://www.gnu.org/copyleft/gpl.txt</bottom>
<link offline="false" href="http://java.sun.com/j2se/1.5/docs/api/"/>
</javadoc>
</target>
<target name="dist" depends="javadoc" description="generate the source distribution">
<mkdir dir="${release}"/>
<delete file="${release}/P-Grid_${minor_version}_src.zip"/>
<zip zipfile="${release}/P-Grid_${minor_version}}_src.zip">
<zipfileset prefix="P-Grid" dir="." includes="build.xml changelog.txt README release_notes.txt"/>
<zipfileset prefix="P-Grid" dir="${bin}" includes="*.bat *.sh"/>
<zipfileset prefix="P-Grid/docs" dir="${docs}" includes="api/**"/>
<zipfileset prefix="P-Grid/lib" dir="${lib}" includes="**"/>
<zipfileset prefix="P-Grid/licenses" dir="${licenses}" includes="*"/>
<zipfileset prefix="P-Grid/resources" dir="${resources}" includes="antilogTable.dat logTable.dat P-Grid.ddl PGridTree.dat PGridTree.ini MessageMapping.xml proxool.properties"/>
<zipfileset prefix="P-Grid/src" dir="${src}" includes="**" excludes="test/planetlab/**"/>
</zip>
</target>
<target name="release" depends="exec, dist" description="generates all files required to release a new version" />
<target name="clean" description="clean up">
<!-- Delete the ${bin} directory trees -->
<delete includeemptydirs="true">
<fileset dir="${classes}" includes="**"/>
<fileset file="${bin}/${jarfile}"/>
<fileset dir="${javadoc}" includes="**"/>
<fileset dir="${release}" includes="**"/>
<fileset dir="${build_src}" includes="**"/>
</delete>
</target>
<target name="cleanTmpFolder" description="clean up temporary folders">
<delete includeemptydirs="true">
<fileset dir="${build_src}" includes="**"/>
</delete>
</target>
</project>