forked from hazelcast/hazelcast
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
184 lines (171 loc) · 7.89 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
183
184
<!--
~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
~
~ Licensed 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 basedir="." name="hazelcast" default="jar">
<property name="version" value="3.2-RC2-SNAPSHOT"/>
<property name="core.src.dir" value="hazelcast/src/main/java"/>
<property name="core.classes.dir" value="hazelcast/target/classes"/>
<property name="core.jar.name" value="hazelcast-${version}.jar"/>
<property name="client.src.dir" value="hazelcast-client/src/main/java"/>
<property name="client.classes.dir" value="hazelcast-client/target/classes"/>
<property name="client.jar.name" value="hazelcast-client-${version}.jar"/>
<target name="core">
<delete dir="${core.classes.dir}" failonerror="false"/>
<mkdir dir="${core.classes.dir}"/>
<javac destdir="${core.classes.dir}" compiler="javac1.5" debug="on" nowarn="yes">
<src path="${core.src.dir}"/>
<exclude name="**/Log4jFactory.java"/>
<exclude name="**/Slf4jFactory.java"/>
<exclude name="**/TestUtil.java"/>
</javac>
<tstamp>
<format property="TODAY" pattern="yyyyMMdd" locale="en"/>
</tstamp>
<echo file="${core.classes.dir}/hazelcast-runtime.properties"
message="hazelcast.build=${TODAY}${line.separator}hazelcast.version=${version}"/>
<copy file="hazelcast/src/main/resources/hazelcast-default.xml" todir="${core.classes.dir}"/>
<jar jarfile="${core.jar.name}">
<fileset dir="${core.src.dir}"/>
<fileset dir="${core.classes.dir}"/>
<manifest>
<attribute name="Built-By" value="Hazelcast.com"/>
<attribute name="Implementation-Vendor" value="Hazelcast.com"/>
<attribute name="Implementation-Title" value="Hazelcast"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Main-Class" value="com.hazelcast.examples.TestApp"/>
</manifest>
</jar>
<copy file="${core.jar.name}" todir="files/web/files"/>
</target>
<target name="client">
<delete dir="${client.classes.dir}" failonerror="false"/>
<mkdir dir="${client.classes.dir}"/>
<javac destdir="${client.classes.dir}" classpath="${core.jar.name}" compiler="javac1.5" debug="on" nowarn="yes">
<src path="${client.src.dir}"/>
</javac>
<jar jarfile="${client.jar.name}">
<fileset dir="${client.src.dir}"/>
<fileset dir="${client.classes.dir}"/>
<manifest>
<attribute name="Built-By" value="Hazelcast.com"/>
<attribute name="Implementation-Vendor" value="Hazelcast.com"/>
<attribute name="Implementation-Title" value="Hazelcast"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Main-Class" value="com.hazelcast.client.examples.TestClientApp"/>
</manifest>
</jar>
</target>
<target name="report">
<delete dir="./reports" failonerror="false"/>
<mkdir dir="./reports"/>
<junitreport todir="./reports">
<fileset dir="./hazelcast/target/surefire-reports">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="./hazelcast-client/target/surefire-reports" erroronmissingdir="false">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="./hazelcast-hibernate/hazelcast-hibernate3/target/surefire-reports" erroronmissingdir="false">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="./hazelcast-hibernate/hazelcast-hibernate4/target/surefire-reports" erroronmissingdir="false">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="./hazelcast-spring/target/surefire-reports" erroronmissingdir="false">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="./hazelcast-cloud/target/surefire-reports" erroronmissingdir="false">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./reports"/>
</junitreport>
</target>
<!--
ant -Dcount=6 -Dprofile=all test
-->
<target name="test">
<exec executable="mvn" dir="./hazelcast">
<arg value="compile"/>
<arg value="compiler:testCompile"/>
</exec>
<delete dir="./hazelcast/target/surefire-reports" failonerror="false"/>
<java classname="com.hazelcast.util.Parallel">
<arg value="${count}"/>
<arg value="${profile}"/>
<classpath>
<pathelement path="./hazelcast/target/test-classes"/>
</classpath>
</java>
<antcall target="report"/>
</target>
<target name="test4">
<antcall target="test">
<param name="count" value="4"/>
<param name="profile" value="all"/>
</antcall>
</target>
<target name="test10">
<antcall target="test">
<param name="count" value="10"/>
<param name="profile" value="all"/>
</antcall>
</target>
<target name="test20">
<antcall target="test">
<param name="count" value="20"/>
<param name="profile" value="all"/>
</antcall>
</target>
<target name="jar">
<antcall target="core"/>
<antcall target="client"/>
</target>
<target name="javadoc">
<javadoc destdir="javadoc" author="true" version="true" use="true"
windowtitle="Hazelcast API - ${version}">
<fileset dir="hazelcast/src/main/java/" defaultexcludes="true">
<include name="**/nio/DataSerializable*"/>
<include name="**/core/**"/>
<include name="**/monitor/**"/>
<include name="**/merge/**"/>
<include name="**/config/**"/>
<include name="**/jmx/**"/>
<include name="**/query/**"/>
<include name="**/partition/**"/>
<include name="**/security/*Credentials*"/>
<include name="**/security/*PermissionPolicy*"/>
<include name="**/security/SecurityContext*"/>
<exclude name="**/impl/partition/**"/>
<exclude name="**/*.html"/>
</fileset>
<fileset dir="hazelcast-client/src/main/java/" defaultexcludes="true">
<include name="**/HazelcastClient.java"/>
<include name="**/ClientConfig.java"/>
<exclude name="**/*.html"/>
</fileset>
<fileset dir="hazelcast-hibernate/src/main/java/" defaultexcludes="true">
<include name="**/HazelcastAccessor.java"/>
<exclude name="**/*.html"/>
</fileset>
<doctitle>
<![CDATA[<h1>Hazelcast ${version}</h1>]]>
</doctitle>
<bottom><![CDATA[<i>Copyright © 2008-2013 Hazelcast, Inc. All Rights Reserved.</i>]]></bottom>
<link offline="false" href="http://docs.oracle.com/javase/1.5.0/docs/api/" packagelistLoc="C:\tmp"/>
<link href="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
<link href="http://java.sun.com/products/servlet/2.3/javadoc/"/>
</javadoc>
</target>
</project>