Skip to content

Commit 8a23270

Browse files
committed
SPRNET-1396
1 parent 76445f9 commit 8a23270

File tree

7 files changed

+83
-102
lines changed

7 files changed

+83
-102
lines changed

Build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@echo ...
55
@echo Running full Build Script, capturing output to buildlog.txt file...
66
@echo Start Time: %time%
7-
build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 >> buildlog.txt
7+
build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt
88
@echo .
99
@echo ..
1010
@echo ...

Spring.build

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ Commandline Examples:
463463
<nant buildfile="src/Spring/Spring.Aop/Spring.Aop.build" target="build" if="${build-aop}"/>
464464
<nant buildfile="src/Spring/Spring.Web/Spring.Web.build" target="build" if="${build-web}"/>
465465
<nant buildfile="src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.build" target="build" if="${build-web and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0')}"/>
466+
<nant buildfile="src/Spring/Spring.Web.Mvc/Spring.Web.Mvc.build" target="build" if="${nant.settings.currentframework == 'net-4.0'}"/>
466467
<nant buildfile="src/Spring/Spring.Data/Spring.Data.build" target="build" if="${build-data}"/>
467468
<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')}"/>
468469
<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')}"/>
@@ -502,6 +503,7 @@ Commandline Examples:
502503
if="${build-data and nant.settings.currentframework == 'net-4.0'}"/>
503504
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services and not net-3.5}"/>
504505
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
506+
<nant buildfile="test/Spring/Spring.Web.Mvc.Tests/Spring.Web.Mvc.Tests.build" target="test" if="${nant.settings.currentframework == 'net-4.0'}"/>
505507
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${build-testing-nunit}"/>
506508
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-microsoft and nant.settings.currentframework == 'net-2.0'}"/>
507509
<nant buildfile="test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build" target="test" if="${build-ems and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
@@ -537,6 +539,7 @@ Commandline Examples:
537539
<property name="build-msmq-tests" value="false" overwrite="true" />
538540
<property name="build-velocity" value="false" overwrite="true" />
539541
<property name="build-testing-microsoft" value="false" overwrite="true" />
542+
<property name="build-quartz" value="false" overwrite="true" />
540543
<call target="compile-test" />
541544
</target>
542545

@@ -574,7 +577,7 @@ Commandline Examples:
574577
<call target="common.generate-assemblyinfo"/>
575578
<property name="build-ems" value="false" overwrite="true" />
576579
<property name="build-nms" value="false" overwrite="true" />
577-
<property name="build-quartz" value="false" overwrite="true" />
580+
<property name="build-quartz" value="true" overwrite="true" />
578581
<property name="build-msmq" value="false" overwrite="true" />
579582
<property name="build-msmq-tests" value="false" overwrite="true" />
580583
<property name="build-velocity" value="false" overwrite="true" />
@@ -585,7 +588,9 @@ Commandline Examples:
585588
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
586589
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services}"/>
587590
<nant buildfile="src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build" target="build" if="${build-quartz}"/>
588-
<nant buildfile="test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build" target="build" if="${build-quartz}"/>
591+
<nant buildfile="test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build" target="test" if="${build-quartz}"/>
592+
<nant buildfile="src/Spring/Spring.Web.Mvc/Spring.Web.Mvc.build" target="build"/>
593+
<nant buildfile="test/Spring/Spring.Web.Mvc.Tests/Spring.Web.Mvc.Tests.build" target="test"/>
589594
</target>
590595

591596
<target name="compile-net-4.0" description="Builds .NET Framework 4.0 version"

common-project.include

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,4 +318,8 @@ ${tool.dir} : dir for tools
318318

319319
</target>
320320

321+
<readregistry property="net35.install.dir" key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\InstallPath" hive="LocalMachine" failonerror="true"/>
322+
<property name="msbuild.exe" value="${net35.install.dir}\msbuild.exe"/>
323+
324+
321325
</project>

src/Spring/CommonAssemblyInfo.cs

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,37 @@
3030
//
3131
//
3232
// This is to support side-by-side deployment of .NET 1.1 and .NET 2.0 versions of the assembly.
33-
#if !NET_2_0
34-
[assembly: AssemblyVersion("1.3.1.11001")]
35-
#endif
3633

37-
#if NET_2_0
38-
[assembly: AssemblyVersion("1.3.1.20001")]
39-
#endif
34+
//note that this #if #elif #endif contstruct requires NET_#_# values be checked in DESCENDING order to work properly
35+
// (e.g., add any new ones at the TOP of this construct!)
4036

41-
#if NET_3_0
37+
#if NET_4_0
38+
[assembly: AssemblyVersion("1.3.1.40001")]
39+
#elif NET_3_5
40+
[assembly: AssemblyVersion("1.3.1.35001")]
41+
#elif NET_3_0
4242
[assembly: AssemblyVersion("1.3.1.30001")]
43+
#elif NET_2_0
44+
[assembly: AssemblyVersion("1.3.1.20001")]
45+
#elif NET_1_1
46+
[assembly: AssemblyVersion("1.3.1.11001")]
47+
#elif NET_1_0
48+
[assembly: AssemblyVersion("1.3.1.10001")]
4349
#endif
4450

45-
#if NET_3_5
46-
[assembly: AssemblyVersion("1.3.1.35001")]
47-
#endif
4851

49-
#if NET_4_0
50-
[assembly: AssemblyVersion("1.3.1.40001")]
51-
#endif
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
5264
//
5365
// In order to sign your assembly you must specify a key to use. Refer to the
5466
// Microsoft .NET Framework documentation for more information on assembly signing.

src/Spring/Spring.Web.Mvc/Spring.Web.Mvc.2010.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34-
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e" />
34+
<Reference Include="Common.Logging">
35+
<HintPath>..\..\..\lib\Net\3.5\Common.Logging.dll</HintPath>
36+
</Reference>
3537
<Reference Include="System" />
3638
<Reference Include="System.Core" />
3739
<Reference Include="System.Web" />
Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,35 @@
11
<?xml version="1.0" ?>
2-
<project name="Spring.Web" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
2+
<project name="Spring.Web.Mvc" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
3+
4+
<include buildfile="${spring.basedir}/common-project.include" />
5+
36
<!--
47
Required properties:
58
* current.bin.dir - (path) root level to build to
69
* current.build.debug - (true|false) debug build?
710
* current.build.defines.csc - framework-specific build defines for C# compiler
811
-->
12+
913
<target name="build">
1014
<!-- build Spring.Web.Mvc -->
11-
<csc target="library" define="${current.build.defines.csc}"
12-
warnaserror="true"
13-
optimize="${build.optimize}"
14-
debug="${current.build.debug}"
15-
output="${current.bin.dir}/${project::get-name()}.dll"
16-
doc="${current.bin.dir}/${project::get-name()}.xml"
17-
>
18-
<arg line="${compiler.args}"/>
19-
<nowarn>
20-
<warning number="${nowarn.numbers},0108,0114,0612,0109" />
21-
<warning number="${nowarn.numbers},1591" if="${nant.settings.currentframework=='mono-2.0'}"/>
22-
</nowarn>
23-
<sources failonempty="true">
24-
<include name="**/*.cs" />
25-
<include name="../GenCommonAssemblyInfo.cs" />
26-
</sources>
27-
<resources basedir="Resources">
28-
<include name="**/*" />
29-
</resources>
30-
<references basedir="${current.bin.dir}">
31-
<include name="Common.Logging.dll"/>
32-
<include name="antlr.runtime.dll" />
33-
<include name="Spring.Core.dll" />
34-
<include name="Spring.Aop.dll" />
35-
<include name="System.Configuration.dll" />
36-
<include name="System.Web.dll" />
37-
<include name="System.Web.Mvc.dll" />
38-
<include name="System.Web.Services.dll" />
39-
<include if="${net-4.0.installed and net-4.0}" name="System.Web.ApplicationServices.dll" />
40-
</references>
41-
</csc>
15+
<property name="solutionconfiguration" value="Debug" if="${current.build.config=='debug'}"/>
16+
<property name="solutionconfiguration" value="Release" unless="${current.build.config=='debug'}" />
17+
18+
<call target="RebuildSolution" />
4219
</target>
20+
21+
<property name="solutionfile" value="${project::get-base-directory()}\${project::get-name()}.2010.csproj" />
22+
<target name="RebuildSolution" description="rebuilds a given solution file">
23+
<echo message="Rebuilding Solution ${solutionfile}" />
24+
<exec program="${msbuild.exe}">
25+
26+
<arg value="/property:OutDir=${current.bin.dir}/"/>
27+
28+
<arg value="${solutionfile}"/>
29+
<arg line="/nologo" />
30+
<arg line="/verbosity:minimal" />
31+
<arg line="/property:Configuration=${solutionconfiguration}"/>
32+
</exec>
33+
</target>
34+
4335
</project>
Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<project name="Spring.Web.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
2+
<project name="Spring.Web.Mvc.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
33

44
<include buildfile="${spring.basedir}/common-project.include" />
55
<!--
@@ -11,61 +11,27 @@
1111
-->
1212
<target name="build">
1313
<!-- build Spring.Web.Mvc -->
14-
<csc target="library" define="${current.build.defines.csc}"
15-
warnaserror="true"
16-
optimize="${build.optimize}"
17-
debug="${current.build.debug}"
18-
output="${current.bin.dir}/${project::get-name()}.dll"
19-
doc="${current.bin.dir}/${project::get-name()}.xml">
20-
<nowarn>
21-
<warning number="${nowarn.numbers.test}" /> <!-- 1701 -->
22-
<warning number="${nowarn.numbers.test},1587" if="${nant.settings.currentframework=='mono-2.0'}"/>
23-
</nowarn>
24-
<sources failonempty="true">
25-
<include name="**/*.cs" />
26-
<include name="../CommonAssemblyInfo.cs" />
27-
</sources>
28-
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
29-
<include name="**/*.resx" />
30-
<include name="**/*.xsd" />
31-
<include name="**/*.txt" />
32-
<include name="**/*.xml" />
33-
<exclude name="Data/**/*" />
34-
<exclude name="obj/**/*" />
35-
</resources>
36-
<references basedir="${current.bin.dir}">
37-
<include name="*.dll" />
38-
<include name="System.Configuration.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
39-
<include name="System.Drawing.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
40-
<include name="System.Xml.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
41-
<include name="System.Web.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
42-
<include name="System.Web.Services.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
43-
<include name="System.Data.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
44-
<exclude name="${project::get-name()}.dll" />
45-
<exclude name="CloverRuntime.dll" />
46-
<include name="${lib.dir}/nunit.core.interfaces.dll" />
47-
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
48-
</references>
49-
</csc>
50-
<copy todir="${current.bin.dir}">
51-
<fileset basedir="${project::get-base-directory()}/Data">
52-
<include name="**/*.*" />
53-
</fileset>
54-
</copy>
55-
56-
</target>
14+
15+
<property name="solutionconfiguration" value="Debug" if="${current.build.config=='debug'}"/>
16+
<property name="solutionconfiguration" value="Release" unless="${current.build.config=='debug'}" />
17+
18+
<call target="RebuildSolution" />
19+
</target>
5720

5821
<target name="test" depends="build">
5922
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
6023
<call target="common.run-tests" />
6124
</target>
62-
<!--
63-
<target name="test" depends="build">
64-
<nunit2outproc>
65-
<formatter type="Plain" />
66-
<formatter type="Xml" usefile="true" extension=".xml" outputdir="${current.bin.dir}/results" />
67-
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll" />
68-
</nunit2outproc>
69-
</target>
70-
-->
25+
26+
<property name="solutionfile" value="${project::get-base-directory()}\${project::get-name()}.2010.csproj" />
27+
<target name="RebuildSolution" description="rebuilds a given solution file">
28+
<echo message="Rebuilding Solution ${solutionfile}" />
29+
<exec program="${msbuild.exe}">
30+
<arg value="/property:OutDir=${current.bin.dir}/"/>
31+
<arg value="${solutionfile}"/>
32+
<arg line="/nologo" />
33+
<arg line="/verbosity:minimal" />
34+
<arg line="/property:Configuration=${solutionconfiguration}"/>
35+
</exec>
36+
</target>
7137
</project>

0 commit comments

Comments
 (0)