-
Notifications
You must be signed in to change notification settings - Fork 934
/
Copy pathdefault.build
459 lines (397 loc) · 17.8 KB
/
default.build
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<?xml version="1.0" ?>
<project
name="NHibernate"
default="build"
xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"
>
<property name="root.dir" value="." />
<include buildfile="${root.dir}/build-common/common.xml" />
<!-- Disable performance tests by default. They take too much time. -->
<property name="run.performance.tests" value="false" overwrite="false" />
<fileset id="buildfiles.all" basedir="src">
<!-- Files have to be in dependency order -->
<include name="Iesi.Collections/Iesi.Collections.build" />
<include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
<include name="NHibernate/NHibernate.build" />
<include name="NHibernate.DomainModel/NHibernate.DomainModel.build" />
<include name="NHibernate.Test/NHibernate.Test.build" />
<include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" />
<include name="NHibernate.Examples/NHibernate.Examples.build" />
<include name="NHibernate.Caches.SysCache/NHibernate.Caches.SysCache.build" />
<include name="NHibernate.Caches.SysCache.Tests/NHibernate.Caches.SysCache.Tests.build" />
<include name="NHibernate.Caches.MemCache/NHibernate.Caches.MemCache.build" />
<include name="NHibernate.Caches.MemCache.Tests/NHibernate.Caches.MemCache.Tests.build" />
<include name="NHibernate.Caches.Prevalence/NHibernate.Caches.Prevalence.build" />
<include name="NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests.build" />
<include name="NHibernate.JetDriver/NHibernate.JetDriver.build" />
<include name="NHibernate.Mapping.Attributes/NHibernate.Mapping.Attributes.build" />
<include name="NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test.build" />
<include name="NHibernate.Tasks/NHibernate.Tasks.build" />
<include name="NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net.build" />
<include name="NHibernate.Tool.hbm2net.Console/NHibernate.Tool.hbm2net.Console.build" />
<include name="NHibernate.Tool.hbm2net.Tests/NHibernate.Tool.hbm2net.Tests.build" />
<include name="NHibernate.UserTypes.Oracle/NHibernate.UserTypes.Oracle.build" />
<include name="NHibernate.UserTypes.SqlTypes/NHibernate.UserTypes.SqlTypes.build" />
<include name="Nullables/Nullables.build" />
<include name="Nullables.NHibernate/Nullables.NHibernate.build" />
<include name="Nullables.Tests/Nullables.Tests.build" />
<include name="NHibernate.UserTypes.Tests/NHibernate.UserTypes.Tests.build" />
</fileset>
<fileset id="buildfiles.tests" basedir="src">
<include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
<include name="NHibernate.Test/NHibernate.Test.build" />
<include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build"
if="${run.performance.tests}" />
<include name="NHibernate.Caches.SysCache.Tests/NHibernate.Caches.SysCache.Tests.build" /> -->
<include name="NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests.build" /> -->
<include name="NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test.build" />
<include name="NHibernate.Tool.hbm2net.Tests/NHibernate.Tool.hbm2net.Tests.build" />
<include name="NHibernate.UserTypes.Tests/NHibernate.UserTypes.Tests.build" />
<include name="Nullables.Tests/Nullables.Tests.build" />
</fileset>
<target name="init" depends="common.init"
description="Initializes build properties" />
<target name="recreate-build-directory">
<echo message="Current Directory is ${project::get-base-directory()}" />
<echo message="Build Directory is ${build.dir}" />
<!-- Prepare build directory -->
<delete dir="${bin.dir}" failonerror="false" />
<mkdir dir="${bin.dir}" />
<call target="copy-referenced-assemblies" />
</target>
<target name="copy-referenced-assemblies">
<!-- Copy framework-neutral libraries -->
<copy todir="${bin.dir}" >
<fileset basedir="${lib.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
<include name="nant/*.*" />
</fileset>
</copy>
<!-- Copy family-specific libraries -->
<!--
The builds of log4net and nunit work just fine for all versions of .NET.
When they do get framework specific extensions then we
can just move them to the framework specific section
-->
<copy todir="${bin.dir}">
<fileset basedir="${lib.family.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
<!-- Copy framework-specific libraries -->
<copy todir="${bin.dir}">
<fileset basedir="${lib.framework.dir}">
<!--
Excludes the Iesi.Collections assembly because it is built during the build
of NHibernate. It is in the lib folder for VS.NET convenience. However, we
do want to copy the license file.
-->
<exclude name="Iesi.Collections.dll" />
<exclude name="Iesi.Collections.xml" />
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
</target>
<target name="build"
depends="init recreate-build-directory"
description="Builds NHibernate in the current configuration">
<nant target="build">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
<target name="test-report" if="${nunit2report.installed}">
<mkdir dir="${build.dir}/testresults" />
<nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults">
<fileset>
<include name="${bin.dir}/*results.xml" />
</fileset>
</nunit2report>
</target>
<target name="test" depends="init build" description="Runs all NHibernate tests for the current framework">
<foreach item="File" property="buildfile">
<in>
<items refid="buildfiles.tests" />
</in>
<do>
<exec program="nant.exe">
<arg value="-f:${buildfile}" />
<arg value="-t:${nant.settings.currentframework}" />
<arg value="test" />
</exec>
</do>
</foreach>
</target>
<target name="coverage-report" description="Builds the Test Coverage reports"
if="${clover.enabled}">
<mkdir dir="${build.dir}/clover" />
<clover-setup
initstring="${clover.db}"
flushinterval="1000"
/>
<clover-report>
<current title="NHibernate Clover Report" output="${build.dir}/clover" >
<format type="html" orderby="Alpha" />
</current>
</clover-report>
</target>
<target name="doc" depends="init doc-clean doc-manual doc-api"
description="Builds the Help Documentation and the API documentation" />
<target name="doc-clean">
<nant target="clean" buildfile="doc/reference/documentation.build" />
</target>
<target name="doc-manual" depends="init" description="Builds the Help Documentation" >
<property name="lang" value="en" />
<nant target="build" buildfile="doc/reference/documentation.build">
<properties>
<property name="lang" value="${lang}" />
</properties>
</nant>
</target>
<target name="doc-api" depends="init" description="Generates the API documentation (in MSDN style and VS.NET 2003 if available)">
<!-- Force .NET 1.1 configuration because NDoc fails with .NET 2.0 assemblies -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
<call target="set-net-1.1-framework-configuration" />
<ndoc>
<assemblies basedir="${bin.dir}">
<include name="Iesi.Collections.dll" />
<include name="NHibernate*.dll" />
<include name="Nullables*.dll" />
<exclude name="*Test*" />
<exclude name="NHibernate.DomainModel.dll" />
<exclude name="NHibernate.Examples.dll" />
</assemblies>
<summaries>
<include name="src/NHibernate/NamespaceSummary.xml" />
<include name="src/Iesi.Collections/NamespaceSummary.xml" />
</summaries>
<documenters>
<documenter name="MSDN">
<property name="OutputDirectory" value="${build.dir}/doc/temp" />
<property name="HtmlHelpName" value="NHibernate.API" />
<property name="IncludeFavorites" value="False" />
<property name="Title" value="NHibernate Class Library - v.${project.version}" />
<property name="SplitTOCs" value="False" />
<property name="DefaulTOC" value="" />
<property name="IncludeHierarchy" value="False" />
<property name="ShowVisualBasic" value="False" />
<property name="RootPageContainsNamespaces" value="False" />
<property name="SortTOCByNamespace" value="True" />
<property name="OutputTarget" value="HtmlHelp" />
<property name="HeaderHtml" value="" />
<property name="FooterHtml" value="" />
<property name="FilesToInclude" value="" />
<property name="LinkToSdkDocVersion" value="${link.sdkdoc.version}" />
<property name="ShowMissingSummaries" value="${build.debug}" />
<property name="ShowMissingRemarks" value="${build.debug}" />
<property name="ShowMissingParams" value="${build.debug}" />
<property name="ShowMissingReturns" value="${build.debug}" />
<property name="ShowMissingValues" value="${build.debug}" />
<property name="DocumentInternals" value="False" />
<property name="DocumentProtected" value="True" />
<property name="DocumentPrivates" value="False" />
<property name="DocumentProtectedInternalAsProtected" value="False" />
<property name="DocumentEmptyNamespaces" value="False" />
<property name="IncludeAssemblyVersion" value="False" />
<property name="CopyrightText" value="NHibernate is licensed under GNU LGPL." />
<property name="CopyrightHref" value="http://www.nhibernate.org/" />
<property name="FeedbackEmailAddress" value="nhibernate-development@lists.sourceforge.net" />
<property name="ReferencesPath" value="" />
<property name="SkipNamespacesWithoutSummaries" value="False" />
<property name="UseNamespaceDocSummaries" value="False" />
<property name="AutoPropertyBackerSummaries" value="False" />
<property name="AutoDocumentConstructors" value="True" />
<property name="DocumentAttributes" value="True" />
<property name="ShowTypeIdInAttributes" value="False" />
<property name="DocumentedAttributes" value="" />
<property name="GetExternalSummaries" value="True" />
<property name="EditorBrowsableFilter" value="Off" />
<property name="UseNDocXmlFile" value="" />
</documenter>
</documenters>
</ndoc>
<copy todir="${build.dir}/doc">
<fileset basedir="${build.dir}/doc/temp">
<include name="*.chm" />
</fileset>
</copy>
<if test="${vshik.installed}">
<ndoc>
<assemblies basedir="${bin.dir}">
<include name="NHibernate.dll" />
<include name="Iesi.Collections.dll" />
</assemblies>
<summaries>
<include name="src/NHibernate/NamespaceSummary.xml" />
<include name="src/Iesi.Collections/NamespaceSummary.xml" />
</summaries>
<documenters>
<documenter name="VS.NET 2003">
<property name="OutputDirectory" value="${build.dir}/doc/temp" />
<property name="HtmlHelpName" value="NHibernate.API" />
<property name="Title" value="NHibernate Class Library - v.${project.version}" />
<property name="HeaderHtml" value="" />
<property name="FooterHtml" value="" />
<property name="LinkToSdkDocVersion" value="${link.sdkdoc.version}" />
<property name="ShowMissingSummaries" value="${build.debug}" />
<property name="ShowMissingRemarks" value="${build.debug}" />
<property name="ShowMissingParams" value="${build.debug}" />
<property name="ShowMissingReturns" value="${build.debug}" />
<property name="ShowMissingValues" value="${build.debug}" />
<property name="DocumentInternals" value="False" />
<property name="DocumentProtected" value="True" />
<property name="DocumentPrivates" value="False" />
<property name="DocumentProtectedInternalAsProtected" value="False" />
<property name="DocumentEmptyNamespaces" value="False" />
<property name="CopyrightText" value="NHibernate is licensed under GNU LGPL." />
<property name="CopyrightHref" value="http://www.nhibernate.org/" />
<property name="FeedbackEmailAddress" value="nhibernate-development@lists.sourceforge.net" />
<property name="ReferencesPath" value="" />
<property name="SkipNamespacesWithoutSummaries" value="False" />
<property name="UseNamespaceDocSummaries" value="False" />
<property name="AutoPropertyBackerSummaries" value="False" />
<property name="AutoDocumentConstructors" value="True" />
<property name="DocumentAttributes" value="True" />
<property name="ShowTypeIdInAttributes" value="False" />
<property name="DocumentedAttributes" value="" />
<property name="EditorBrowsableFilter" value="Off" />
<property name="UseNDocXmlFile" value="" />
</documenter>
</documenters>
</ndoc>
<copy todir="${build.dir}/doc/help2">
<fileset basedir="${build.dir}/doc/temp">
<include name="*.HxS" />
</fileset>
</copy>
<copy todir="${build.dir}/doc/help2">
<fileset basedir="doc/reference/support/help2">
<include name="*" />
</fileset>
</copy>
</if>
<delete dir="${build.dir}/doc/temp" />
<!-- Restore the original framework configuration -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>
<target name="build-all-frameworks" depends="init">
<!-- Save the current framework -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
<!-- Execute build for each framework -->
<foreach item="String" delim=" " property="framework" in="net-1.1 net-2.0">
<call target="set-${framework}-framework-configuration" />
<call target="build" />
</foreach>
<!-- Reset the current framework to the saved value -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>
<target name="binaries" depends="init">
<property name="clover.enabled" value="false" />
<call target="build-all-frameworks" />
<!-- Copy and rename the license -->
<copy file="lgpl.txt" tofile="${bin.dir}/NHibernate.license.txt" />
</target>
<target name="test-all-frameworks" depends="init">
<!-- Save the current framework -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
<!-- Execute build for each framework -->
<foreach item="String" delim=" " property="framework" in="net-1.1 net-2.0">
<call target="set-${framework}-framework-configuration" />
<call target="test" />
</foreach>
<!-- Reset the current framework to the saved value -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>
<target name="reports" depends="init">
<property name="clover.enabled" value="false" />
<call target="test-all-frameworks" />
<call target="test-report" />
<call target="coverage-report" />
</target>
<target name="sources" depends="init">
<copy todir="${build.dir}">
<fileset>
<!-- copy dlls used by this build -->
<include name="${lib.dir}/**" />
<!-- copy all of the NHibernate source -->
<include name="src/NHibernate*/**" />
<include name="src/Iesi*/**" />
<include name="src/Nullables*/**" />
<include name="src/*.*" />
<include name="build-common/**" />
<include name="*.build" />
<include name="gfdl.txt" />
<include name="lgpl.txt" />
<include name="releasenotes.txt" />
<include name="readme.html" />
<!-- exclude the Clover modified source files. -->
<exclude name="${clover.src}/**" />
<!-- exclude ReSharper stuff -->
<exclude name="**/_ReSharper*/**" />
<exclude name="**/*.resharperoptions" />
<!-- exclude VS.NET stuff -->
<exclude name="**/*.suo" />
<exclude name="**/*.user" />
<exclude name="**/bin/**" />
<exclude name="**/obj/**" />
</fileset>
</copy>
<!-- Generate AssemblyInfo.cs files for Visual Studio -->
<nant buildfile="${build.dir}/default.build" target="visual-studio" />
</target>
<target name="package" depends="init test-all-frameworks binaries doc sources"
description="Creates Zip files for the File Release System on SourceForge">
<property name="zip.output.dir" value="${project::get-base-directory()}/build/" />
<property name="zip.file.name" value="${zip.output.dir}/${build.name}.zip" />
<!--
Don't zip reports - temporarily disabled
<zip zipfile="${project::get-base-directory()}/build/${build.name}-clover-${nant.settings.currentframework}.zip" ziplevel="9">
<fileset basedir="${build.dir}">
<include name="clover/**" />
</fileset>
</zip>
-->
<zip zipfile="${zip.file.name}" ziplevel="9">
<fileset basedir="${build.dir}">
<include name="**/*" />
<exclude name="clover/**" />
<exclude name="bin/log.txt" />
<exclude name="bin/*-results.xml" />
</fileset>
</zip>
<echo message="Created a '${project.config}' package in file://${zip.file.name}" />
</target>
<target name="fxcop" depends="init" >
<exec program="${fxcop.exe}"
commandline="/f:${build.dir}\bin\nhibernate.dll /o:${build.dir}\bin\fxcop-results.xml"
failonerror="false"/>
</target>
<target name="simian" depends="init" >
<exec program="${simian.exe}" verbose="true"
commandline="-recurse=src/*.cs -formatter=xml:${build.dir}\bin\simian-results.xml -failOnDuplication-"
failonerror="false"/>
</target>
<target name="visual-studio" depends="init">
<property name="visual-studio" value="true" />
<nant target="generate-assemblyinfo">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
<target name="cleanall" description="Deletes every build configuration">
<echo message="Deleting all builds from all configurations" />
<delete dir="build" failonerror="false" />
<delete dir="${clover.src}" failonerror="false" />
</target>
<target name="clean" depends="init" description="Deletes current build">
<delete dir="${build.dir}" failonerror="false" />
<delete dir="${clover.src}" failonerror="false" />
</target>
<target name="clean-bin" depends="init" description="Deletes the current bin folder">
<delete dir="${bin.dir}" failonerror="false" />
</target>
</project>