-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
191 lines (148 loc) · 5.59 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
185
186
187
188
189
190
191
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Jul 28, 2009 9:08:25 PM
DataValve Build file for creating the distribution.
Andy Gibson
====================================================================== -->
<project name="datavalve-builder" default="default">
<description>
Build file to clean and build the datavalve projects and create the distribution
</description>
<!-- External Setup -->
<property environment="env"/>
<property name="maven.dir" value="${env.M2_HOME}" />
<property name="version" value="1.0.0.final" />
<property name="doc.dir" value="..\docs\" />
<property name="release.dir" value="release\" />
<property name="samples.dir" value="..\samples\" />
<property name="apidocs.dir" value="target\apidocs" />
<property name="zip.base.dir" value="${release.dir}\staging\" />
<property name="staging.dir" value="${release.dir}\staging\DataValve-${version}\" />
<property name="staging.dist.dir" value="${staging.dir}\dist\" />
<property name="staging.samples.dir" value="${staging.dir}\samples\" />
<property name="staging.sources.dir" value="${staging.dist.dir}\sources\" />
<property name="staging.docs.dir" value="${staging.dir}\docs\" />
<property name="staging.docs.api.dir" value="${staging.docs.dir}\api\" />
<property name="staging.docs.ref.dir" value="${staging.docs.dir}\reference\" />
<property name="staging.src.dir" value="${staging.dir}\src\" />
<property environment="env" />
<!--<property name="maven.dir" value="${env.M2_HOME}"/>-->
<!-- =================================
target: clear
================================= -->
<target name="clean">
<delete dir="${release.dir}" />
</target>
<!-- =================================
target: prepare
================================= -->
<target name="prepare" depends="clean">
<exec executable="${maven.dir}\bin\mvn.bat">
<arg value="clean" />
<arg value="-q" />
</exec>
<mkdir dir="${release.dir}" />
<mkdir dir="${staging.dir}" />
<mkdir dir="${staging.docs.dir}" />
<mkdir dir="${staging.docs.api.dir}" />
<mkdir dir="${staging.docs.ref.dir}" />
<mkdir dir="${staging.src.dir}" />
<mkdir dir="${staging.samples.dir}" />
</target>
<target name="buildIt" depends="prepare">
<exec executable="${maven.dir}\bin\mvn.bat">
<arg value="package" />
<arg value="-Dmaven.test.skip=true" />
<arg value="-q" />
</exec>
<exec executable="${maven.dir}\bin\mvn.bat">
<arg value="org.apache.maven.plugins:maven-source-plugin:jar" />
<arg value="-q" />
</exec>
</target>
<target name="copySource" depends="prepare">
<copy todir="${staging.src.dir}">
<fileset dir="${basedir}">
<include name="**/*.java" />
<include name="**/*.xml" />
<include name="**/*.css" />
<include name="**/*.png" />
<include name="**/*.properties" />
<exclude name="**/target/**/*.*" />
<exclude name="${release.dir}" />
<exclude name="build.xml" />
</fileset>
</copy>
</target>
<target name="copyAdditionalFiles" depends="prepare">
<copy todir="${staging.dir}">
<fileset dir="${basedir}">
<include name="/*.txt" />
<exclude name="${release.dir}" />
</fileset>
</copy>
</target>
<target name="javadoc" depends="prepare">
<exec executable="${maven.dir}\bin\mvn.bat">
<arg value="javadoc:aggregate-jar" />
<arg value="-q" />
</exec>
<copy todir="${staging.docs.api.dir}">
<fileset dir="${apidocs.dir}/">
<include name="**\*.*\" />
</fileset>
</copy>
</target>
<target name="moveReferenceDocs" depends="prepare">
<copy todir="${staging.docs.ref.dir}">
<fileset dir="${doc.dir}\target\docbkx\">
<include name="**\*.*" />
<exclude name="**\*.fo" />
</fileset>
</copy>
</target>
<target name="moveBin">
<copy todir="${staging.dist.dir}" flatten="true">
<fileset dir="${basedir}">
<include name="**\*.jar" />
<exclude name="**\*-sources.jar" />
<exclude name="docs\*.*" />
<exclude name="${release.dir}" />
</fileset>
</copy>
<copy todir="${staging.sources.dir}" flatten="true">
<fileset dir="${basedir}">
<include name="**\*-sources.jar" />
<exclude name="${release.dir}" />
</fileset>
</copy>
</target>
<target name="moveSamples" depends="prepare">
<copy todir="${staging.samples.dir}">
<fileset dir="${samples.dir}">
<exclude name="**/target/**" />
<exclude name="**/.*/**" />
</fileset>
</copy>
</target>
<target name="zipIt">
<zip destfile="${release.dir}\datavalve-${version}.zip">
<fileset dir="${zip.base.dir}">
<include name="**\*.*" />
</fileset>
</zip>
<tar destfile="${release.dir}\datavalve-${version}.tar">
<fileset dir="${zip.base.dir}">
<include name="**\*.*" />
</fileset>
</tar>
<gzip destfile="${release.dir}\datavalve-${version}.tar.gz" src="${release.dir}\datavalve-${version}.tar" />
<delete file="${release.dir}\datavalve-${version}.tar" />
</target>
<!-- =================================
target: default
================================= -->
<target name="default" depends="clean,buildIt,javadoc,copySource,moveBin,moveReferenceDocs,copyAdditionalFiles,moveSamples, zipIt" description="build it all">
<!--<delete dir="${staging.dir}" />-->
</target>
</project>