blob: cb437544353577a49741a3147b142b28e69cbed8 (
plain)
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
|
<!--
-
- 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="AMQ Java" default="build">
<import file="common.xml"/>
<property name="modules.core" value="common client broker"/>
<property name="modules.tests" value="systests perftests integrationtests"/>
<property name="modules.management" value="management/eclipse-plugin"/>
<property name="modules" value="${modules.core} ${modules.tests} ${modules.management}"/>
<property name="qpid.jar" location="${build.lib}/qpid-incubating.jar"/>
<basename property="qpid.jar.name" file="${qpid.jar}"/>
<map property="release.excludes" value="${modules}">
<regexpmapper from="(.*)" to="\1/**"/>
</map>
<property name="release.zip" location="${release}/${project.namever}.zip"/>
<property name="release.tar" location="${release}/${project.namever}.tar"/>
<property name="release.tgz" location="${release}/${project.namever}.tar.gz"/>
<property name="release.bz2" location="${release}/${project.namever}.tar.bz2"/>
<macrodef name="iterate">
<attribute name="target"/>
<attribute name="modules" default="${modules}"/>
<element name="elements" implicit="true" optional="true"/>
<sequential>
<subant target="@{target}" antfile="build.xml">
<filelist dir="." files="@{modules}"/>
<elements/>
</subant>
</sequential>
</macrodef>
<target name="compile" description="compile sources">
<iterate target="compile"/>
</target>
<target name="compile-tests" description="compile unit tests">
<iterate target="compile-tests"/>
</target>
<target name="test" description="execute unit tests">
<iterate target="test"/>
</target>
<target name="jar" description="create jars">
<iterate target="jar"/>
</target>
<target name="jar-tests" description="create unit test jars">
<iterate target="jar-tests"/>
</target>
<target name="libs" description="copy dependencies into build directory">
<iterate target="libs"/>
</target>
<target name="doc" description="generate api-doc">
<iterate target="doc"/>
</target>
<target name="check-manifest">
<uptodate property="manifest.done" targetfile="${qpid.jar}">
<srcfiles dir="${build.lib}" includes="**/*.jar" excludes="**/${qpid.jar.name}"/>
</uptodate>
</target>
<target name="manifest" depends="check-manifest" unless="manifest.done">
<manifestclasspath property="qpid.jar.classpath" jarfile="${qpid.jar}">
<classpath>
<fileset dir="${build.lib}" includes="**/*.jar" excludes="**/${qpid.jar.name}"/>
</classpath>
</manifestclasspath>
<jar destfile="${qpid.jar}">
<manifest>
<attribute name="Class-Path" value="${qpid.jar.classpath}"/>
</manifest>
</jar>
<touch file="${qpid.jar}"/>
</target>
<target name="build" description="build distribution">
<iterate target="build"/>
<antcall target="manifest"/>
</target>
<target name="prepare">
<mkdir dir="${release}"/>
</target>
<target name="zip" depends="build,prepare" description="produce a zip archive of the distribution tree">
<zip destfile="${release.zip}">
<zipfileset dir="${build}" prefix="${project.namever}" excludes="${release.excludes}"/>
</zip>
</target>
<target name="tar" depends="build,prepare" description="produce a tar archive of the distribution tree">
<tar destfile="${release.tar}">
<tarfileset dir="${build}" prefix="${project.namever}" excludes="${release.excludes}"/>
</tar>
</target>
<target name="gzip" depends="tar" description="produce a gzipped tarball of the distribution tree">
<gzip src="${release.tar}" destfile="${release.tgz}"/>
</target>
<target name="bzip2" depends="tar" description="produze a bzipped tarball of the distribution tree">
<bzip2 src="${release.tar}" destfile="${release.bz2}"/>
</target>
<target name="archive" depends="zip,gzip,bzip2" description="produce all archive formats of the distribution tree"/>
<target name="clean" description="remove all build artifacts">
<iterate target="clean"/>
<delete dir="${build}"/>
<delete dir="${release}"/>
</target>
</project>
|