Skip to content

Commit 573a090

Browse files
committed
Added support for NH 3.0 (built from trunk), added net-3.5 target to build file, added NH 3.0 targets to build, set NH 2.1 to be part of standard build
1 parent 264cc82 commit 573a090

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8360
-54
lines changed

Spring.build

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,25 @@ Build properties that may be set:
300300
</target>
301301

302302

303+
<target name="compile-build-3.5" description="Builds for .NET 3.5 if available">
304+
305+
<if test="${net-3.5.installed}">
306+
<call target="compile-net-3.5"/>
307+
</if>
308+
309+
<if test="${not net-3.5.installed}">
310+
<if test="${property::exists('project.build.package') and project.build.package}">
311+
.NET 3.5 Build Skipped for Package
312+
<fail message="The .NET Framework 3.5 is not available."/>
313+
<echo message="The .NET Framework 3.5 is not available. Build skipped during package."/>
314+
</if>
315+
<if test="${not(property::exists('project.build.package') and project.build.package)}">
316+
<echo message="The .NET Framework 3.5 is not available. Build skipped."/>
317+
</if>
318+
</if>
319+
</target>
320+
321+
303322
<!-- Targets for other .NET frameworks -->
304323

305324
<target name="compile-build-netcf-1.0" description="Builds for .NET 1.0 Compact Framework if available">
@@ -342,6 +361,7 @@ Build properties that may be set:
342361
<property name="nh12.lib.dir" value="${spring.basedir}/lib/NHibernate12/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
343362
<property name="nh20.lib.dir" value="${spring.basedir}/lib/NHibernate20/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
344363
<property name="nh21.lib.dir" value="${spring.basedir}/lib/NHibernate21/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
364+
<property name="nh30.lib.dir" value="${spring.basedir}/lib/NHibernate30/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
345365
<call target="copylibs"/>
346366

347367
<!-- build assemblies -->
@@ -354,6 +374,7 @@ Build properties that may be set:
354374
<nant buildfile="src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-1.1' or nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0') and not net-3.0}"/>
355375
<nant buildfile="src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0') and not net-3.0}"/>
356376
<nant buildfile="src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0') and not net-3.0}"/>
377+
<nant buildfile="src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-3.5' or nant.settings.currentframework == 'mono-2.0') and not net-3.0}"/>
357378
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
358379
<nant buildfile="src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.build" target="build" if="${build-testing and not net-3.0}"/>
359380
<nant buildfile="src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build" target="build" if="${build-testing-mstest and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
@@ -377,6 +398,10 @@ Build properties that may be set:
377398
if="${build-data and nant.settings.currentframework == 'net-2.0' and not net-3.0}"/>
378399
<nant buildfile="test/Spring/Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate21.Integration.Tests.build" target="test"
379400
if="${build-data and nant.settings.currentframework == 'net-2.0' and not net-3.0}"/>
401+
<nant buildfile="test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build" target="test"
402+
if="${build-data and nant.settings.currentframework == 'net-3.5' and not net-3.0}"/>
403+
<nant buildfile="test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build" target="test"
404+
if="${build-data and nant.settings.currentframework == 'net-3.5' and not net-3.0}"/>
380405
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services}"/>
381406
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web and not net-3.0}"/>
382407
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${not net-3.0}"/>
@@ -444,6 +469,18 @@ Build properties that may be set:
444469
<call target="compile-test" />
445470
</target>
446471

472+
<target name="compile-net-3.5" description="Builds .NET Framework 3.5 version"
473+
depends="set-net-3.5-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
474+
<call target="copykeys" if="${project.build.sign}"/>
475+
<call target="common.generate-assemblyinfo"/>
476+
<property name="build-nms" value="false" />
477+
<property name="build-quartz" value="false" />
478+
<property name="build-msmq" value="false" />
479+
<property name="build-msmq-tests" value="false" />
480+
<property name="build-velocity" value="false" />
481+
<call target="compile-test" />
482+
</target>
483+
447484
<target name="compile-mono-2.0" description="Builds MONO Framework 2.0 version"
448485
depends="set-mono-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
449486
<call target="copykeys" if="${project.build.sign}"/>
@@ -574,6 +611,24 @@ Build properties that may be set:
574611
</if>
575612
</target>
576613

614+
<target name="build-3.5">
615+
<call target="set-build-namespaces-release"/>
616+
<echo message="------------------------"/>
617+
<echo message="Building .NET 3.5 DEBUG "/>
618+
<echo message="------------------------"/>
619+
<call target="set-debug-build-configuration"/>
620+
<call target="compile-build-3.5"/>
621+
622+
623+
<if test="${property::exists('project.build.package') and project.build.package}">
624+
<echo message="--------------------------"/>
625+
<echo message="Building .NET 3.5 RELEASE "/>
626+
<echo message="--------------------------"/>
627+
<call target="set-release-build-configuration"/>
628+
<call target="compile-build-3.5"/>
629+
</if>
630+
</target>
631+
577632
<target name="build-mono-2.0">
578633

579634
<if test="${property::exists('project.build.package') and project.build.package}">
@@ -618,9 +673,11 @@ Build properties that may be set:
618673
<delete dir="src/Spring/Spring.Data.NHibernate12/bin" failonerror="false"/>
619674
<delete dir="src/Spring/Spring.Data.NHibernate20/obj" failonerror="false"/>
620675
<delete dir="src/Spring/Spring.Data.NHibernate20/bin" failonerror="false"/>
621-
<delete dir="src/Spring/Spring.Data.NHibernate21/obj" failonerror="false"/>
622-
<delete dir="src/Spring/Spring.Data.NHibernate21/bin" failonerror="false"/>
623-
<delete dir="src/Spring/Spring.Services/obj" failonerror="false"/>
676+
<delete dir="src/Spring/Spring.Data.NHibernate21/obj" failonerror="false"/>
677+
<delete dir="src/Spring/Spring.Data.NHibernate21/bin" failonerror="false"/>
678+
<delete dir="src/Spring/Spring.Data.NHibernate30/obj" failonerror="false"/>
679+
<delete dir="src/Spring/Spring.Data.NHibernate30/bin" failonerror="false"/>
680+
<delete dir="src/Spring/Spring.Services/obj" failonerror="false"/>
624681
<delete dir="src/Spring/Spring.Services/bin" failonerror="false"/>
625682
<delete dir="src/Spring/Spring.Messaging.Nms/obj" failonerror="false"/>
626683
<delete dir="src/Spring/Spring.Messaging.Nms/bin" failonerror="false"/>
@@ -653,11 +710,15 @@ Build properties that may be set:
653710
<delete dir="test/Spring/Spring.Data.NHibernate20.Tests/bin" failonerror="false"/>
654711
<delete dir="test/Spring/Spring.Data.NHibernate20.Integration.Tests/obj" failonerror="false"/>
655712
<delete dir="test/Spring/Spring.Data.NHibernate20.Integration.Tests/bin" failonerror="false"/>
656-
<delete dir="test/Spring/Spring.Data.NHibernate21.Tests/obj" failonerror="false"/>
657-
<delete dir="test/Spring/Spring.Data.NHibernate21.Tests/bin" failonerror="false"/>
658-
<delete dir="test/Spring/Spring.Data.NHibernate21.Integration.Tests/obj" failonerror="false"/>
659-
<delete dir="test/Spring/Spring.Data.NHibernate21.Integration.Tests/bin" failonerror="false"/>
660-
<delete dir="test/Spring/Spring.Services.Tests/obj" failonerror="false"/>
713+
<delete dir="test/Spring/Spring.Data.NHibernate21.Tests/obj" failonerror="false"/>
714+
<delete dir="test/Spring/Spring.Data.NHibernate21.Tests/bin" failonerror="false"/>
715+
<delete dir="test/Spring/Spring.Data.NHibernate21.Integration.Tests/obj" failonerror="false"/>
716+
<delete dir="test/Spring/Spring.Data.NHibernate21.Integration.Tests/bin" failonerror="false"/>
717+
<delete dir="test/Spring/Spring.Data.NHibernate30.Tests/obj" failonerror="false"/>
718+
<delete dir="test/Spring/Spring.Data.NHibernate30.Tests/bin" failonerror="false"/>
719+
<delete dir="test/Spring/Spring.Data.NHibernate30.Integration.Tests/obj" failonerror="false"/>
720+
<delete dir="test/Spring/Spring.Data.NHibernate30.Integration.Tests/bin" failonerror="false"/>
721+
<delete dir="test/Spring/Spring.Services.Tests/obj" failonerror="false"/>
661722
<delete dir="test/Spring/Spring.Services.Tests/bin" failonerror="false"/>
662723
<delete dir="test/Spring/Spring.Messaging.Nms.Tests/obj" failonerror="false"/>
663724
<delete dir="test/Spring/Spring.Messaging.Nms.Tests/bin" failonerror="false"/>
@@ -1003,6 +1064,10 @@ Build properties that may be set:
10031064
<include name="**/Spring.Data.NHibernate20.xml"/>
10041065
<include name="**/Spring.Data.NHibernate20.pdb"/>
10051066

1067+
<include name="**/Spring.Data.NHibernate21.dll"/>
1068+
<include name="**/Spring.Data.NHibernate21.xml"/>
1069+
<include name="**/Spring.Data.NHibernate21.pdb"/>
1070+
10061071
<include name="**/Spring.Web.dll"/>
10071072
<include name="**/Spring.Web.xml"/>
10081073
<include name="**/Spring.Web.pdb"/>
@@ -1162,6 +1227,15 @@ Build properties that may be set:
11621227
</copy>
11631228
</if>
11641229

1230+
<mkdir dir="${current.package.dir}/lib/NHibernate21"/>
1231+
<if test="${property::exists('build.allnamespaces') and not build.allnamespaces}">
1232+
<copy todir="${current.package.dir}/lib/NHibernate21">
1233+
<fileset basedir="lib/NHibernate21">
1234+
<include name="**/*.dll"/>
1235+
<include name="**/*.license.txt"/>
1236+
</fileset>
1237+
</copy>
1238+
</if>
11651239

11661240
<if test="${property::exists('build.allnamespaces') and build.allnamespaces}">
11671241
<copy todir="${current.package.dir}/lib">
@@ -1392,6 +1466,7 @@ Build properties that may be set:
13921466
<include name="src/Spring/Spring.Data.NHibernate/**"/>
13931467
<include name="src/Spring/Spring.Data.NHibernate12/**"/>
13941468
<include name="src/Spring/Spring.Data.NHibernate20/**"/>
1469+
<include name="src/Spring/Spring.Data.NHibernate21/**"/>
13951470
<include name="src/Spring/Spring.Messaging/**"/>
13961471
<include name="src/Spring/Spring.Messaging.Nms/**"/>
13971472
<include name="src/Spring/Spring.Scheduling.Quartz/**"/>
@@ -1409,6 +1484,8 @@ Build properties that may be set:
14091484
<include name="test/Spring/Spring.Data.NHibernate.Integration.Tests/**"/>
14101485
<include name="test/Spring/Spring.Data.NHibernate20.Tests/**"/>
14111486
<include name="test/Spring/Spring.Data.NHibernate20.Integration.Tests/**"/>
1487+
<include name="test/Spring/Spring.Data.NHibernate21.Tests/**"/>
1488+
<include name="test/Spring/Spring.Data.NHibernate21.Integration.Tests/**"/>
14121489
<include name="test/Spring/Spring.Messaging.Tests/**"/>
14131490
<include name="test/Spring/Spring.Messaging.Nms.Tests/**"/>
14141491
<include name="test/Spring/Spring.Scheduling.Quartz.Tests/**"/>

Spring.include

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
if="${net-3.0.installed}" />
4141
</if>
4242

43+
<property name="net-3.5" value="false"/>
44+
<property name="registry.net-3.5.installed" value="0" overwrite="false"/>
4345

46+
<readregistry property="registry.net-3.5.installed"
47+
key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\Install"
48+
hive="LocalMachine"
49+
failonerror="false" />
50+
51+
<property name="net-3.5.installed" value="${registry.net-3.5.installed == '1'}" />
4452

4553
<target name="check-bin-dir">
4654
<if test="${not property::exists('bin.dir')}">
@@ -392,6 +400,25 @@
392400
<property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true"/>
393401
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default},1701"/>
394402
</target>
403+
<target name="set-net-3.5-runtime-configuration"
404+
depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
405+
<property name="nant.settings.currentframework" value="net-2.0"/>
406+
<property name="nant.settings.currentframework.number" value="2.0"/>
407+
<!-- revision number used when generating assembly info -->
408+
<property name="nant.settings.currentframework.revisionnumber" value="35"/>
409+
<property name="net-2.0" value="true"/>
410+
<property name="net-3.0" value="true"/>
411+
<property name="net-3.5" value="true"/>
412+
<property name="current.build.debug" value="${build.debug}" dynamic="true"/>
413+
<property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,NET_3_0,NET_3_5" dynamic="true"/>
414+
<property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0 /D NET_3_0 /D NET_3_5" dynamic="true"/>
415+
<property name="current.bin.dir"
416+
value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/3.5/${current.build.config}"/>
417+
<property name="current.sdkdoc.dir"
418+
value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/3.5"/>
419+
<property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true"/>
420+
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default},1701"/>
421+
</target>
395422
<target name="set-netcf-1.0-runtime-configuration"
396423
depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
397424
<property name="nant.settings.currentframework" value="netcf-1.0"/>

0 commit comments

Comments
 (0)