SPRNET-1443

-fixing build script to properly support MVC3 and MVC3 tests
This commit is contained in:
sbohlen
2011-05-23 03:14:07 +00:00
parent 6ef068396c
commit 3bd1c5b33b
5 changed files with 169 additions and 1 deletions

View File

@@ -471,6 +471,7 @@ Commandline Examples:
<nant buildfile="src/Spring/Spring.Web/Spring.Web.build" target="build" if="${build-web}"/>
<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 == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Web.Mvc/Spring.Web.Mvc.build" target="build" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.build" target="build" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="src/Spring/Spring.Data/Spring.Data.build" target="build" if="${build-data}"/>
<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')}"/>
<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 == 'net-3.5' or nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
@@ -519,6 +520,7 @@ Commandline Examples:
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services and not net-3.5}"/>
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
<nant buildfile="test/Spring/Spring.Web.Mvc.Tests/Spring.Web.Mvc.Tests.build" target="test" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="test/Spring/Spring.Web.Mvc3.Tests/Spring.Web.Mvc3.Tests.build" target="test" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${build-testing-nunit}"/>
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-microsoft and nant.settings.currentframework != 'net-1.1'}"/>
<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' or nant.settings.currentframework == 'net-4.0' ) and not net-3.0}"/>
@@ -1503,6 +1505,10 @@ Commandline Examples:
<include name="*/*/Spring.Web.Mvc.dll"/>
<include name="*/*/Spring.Web.Mvc.xml"/>
<include name="*/*/Spring.Web.Mvc.pdb"/>
<include name="*/*/Spring.Web.Mvc3.dll"/>
<include name="*/*/Spring.Web.Mvc3.xml"/>
<include name="*/*/Spring.Web.Mvc3.pdb"/>
<include name="*/*/Spring.Web.Extensions.dll"/>
<include name="*/*/Spring.Web.Extensions.xml"/>
@@ -1788,7 +1794,8 @@ Commandline Examples:
<include name="src/Spring/Spring.Core/**"/>
<include name="src/Spring/Spring.Aop/**"/>
<include name="src/Spring/Spring.Web/**"/>
<include name="src/Spring/Spring.Web.Mvc/**"/>
<include name="src/Spring/Spring.Web.Mvc/**"/>
<include name="src/Spring/Spring.Web.Mvc3/**"/>
<include name="src/Spring/Spring.Web.Extensions/**"/>
<include name="src/Spring/Spring.Services/**"/>
<include name="src/Spring/Spring.Data/**"/>
@@ -1811,6 +1818,7 @@ Commandline Examples:
<include name="test/Spring/Spring.Aop.Tests/**"/>
<include name="test/Spring/Spring.Web.Tests/**"/>
<include name="test/Spring/Spring.Web.Mvc.Tests/**"/>
<include name="test/Spring/Spring.Web.Mvc3.Tests/**"/>
<include name="test/Spring/Spring.Services.Tests/**"/>
<include name="test/Spring/Spring.Data.Tests/**"/>
<include name="test/Spring/Spring.Data.Integration.Tests/**"/>
@@ -1847,6 +1855,7 @@ Commandline Examples:
<include name="examples/Spring/Spring.Calculator/src/Spring.Calculator.Web.2005/Bin/*.refresh"/>
<include name="examples/Spring/Spring.WebQuickStart/**"/>
<include name="examples/Spring/Spring.MvcQuickStart/**"/>
<include name="examples/Spring/Spring.Mvc3QuickStart/**"/>
<include name="examples/Spring/Spring.Web.Extensions.Example/**"/>
<include name="examples/Spring/Spring.Web.Extensions.Example/src/Spring.Web.Extensions.Example.2005/Bin/*.refresh"/>
<include name="examples/Spring/SpringAir/**"/>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" ?>
<project name="Spring.Web.Mvc3" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
<!--
Required properties:
* current.bin.dir - (path) root level to build to
* current.build.debug - (true|false) debug build?
* current.build.defines.csc - framework-specific build defines for C# compiler
-->
<target name="build">
<!-- build Spring.Web.Mvc -->
<csc target="library" define="${current.build.defines.csc}"
warnaserror="true"
optimize="${build.optimize}"
debug="${current.build.debug}"
output="${current.bin.dir}/${project::get-name()}.dll"
doc="${current.bin.dir}/${project::get-name()}.xml"
>
<arg line="${compiler.args}"/>
<nowarn>
<warning number="${nowarn.numbers},0108,0114,0612,0109" />
<warning number="${nowarn.numbers},1591" if="${nant.settings.currentframework=='mono-2.0'}"/>
</nowarn>
<sources failonempty="true">
<include name="**/*.cs" />
<include name="../GenCommonAssemblyInfo.cs" />
</sources>
<resources basedir="Resources">
<include name="**/*" />
</resources>
<references basedir="${current.bin.dir}">
<include name="Common.Logging.dll"/>
<include name="antlr.runtime.dll" />
<include name="Spring.Core.dll" />
<include name="Spring.Aop.dll" />
<include name="System.Configuration.dll" />
<include name="System.Web.dll" />
<include name="System.Web.Routing.dll"/>
<include name="System.Web.Abstractions.dll"/>
<include name="System.Web.Services.dll" />
<include name="C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll" />
<include name="C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll" />
<include name="System.Web.ApplicationServices.dll" />
</references>
</csc>
</target>
</project>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Spring.Web.Mvc3</id>
<projectUrl>http://www.springframework.net/</projectUrl>
<licenseUrl>http://www.springframework.net/license.html</licenseUrl>
<iconUrl>http://springframework.net/images/SpringSource_Leaves32x32.png</iconUrl>
<version>0.0.0</version>
<!-- this value is a placeholder replaced by build script -->
<authors>SpringSource</authors>
<description>Interfaces and classes that provide ASP.NET MVC3 application support in Spring.Net</description>
<summary>Interfaces and classes that provide ASP.NET MVC3 application support in Spring.Net</summary>
<language>en-US</language>
<dependencies>
<dependency id="Common.Logging" version="1.2.0" />
<dependency id="Spring.Core" version="1.3.1" />
</dependencies>
</metadata>
<files>
<file src="..\..\..\build\net\4.0\release\Spring.Web.Mvc3.dll" target="lib\net40" />
<file src="..\..\..\build\net\4.0\release\Spring.Web.Mvc3.pdb" target="lib\net40" />
<file src="..\..\..\build\net\4.0\release\Spring.Web.Mvc3.xml" target="lib\net40" />
</files>
</package>

View File

@@ -57,6 +57,8 @@
<include name="${lib.dir}/nunit.core.interfaces.dll" />
<exclude if="${net-4.0}" name="System.Web.Extensions.dll" />
<exclude name="Spring.Web.Mvc3.dll" />
<exclude name="Spring.Web.Mvc3.Tests.dll" />
</references>
</csc>
<copy todir="${current.bin.dir}">

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" ?>
<project name="Spring.Web.Mvc3.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
<include buildfile="${spring.basedir}/common-project.include" />
<!--
Required properties:
* current.bin.dir - (path) root level to build to
* build.debug - (true|false) debug build?
* current.build.defines.csc - framework-specific build defines
* lib.dir - framework-specific assembly references
-->
<target name="build">
<!-- build Spring.Web.Mvc -->
<csc target="library" define="${current.build.defines.csc}"
warnaserror="true"
optimize="${build.optimize}"
debug="${current.build.debug}"
output="${current.bin.dir}/${project::get-name()}.dll"
doc="${current.bin.dir}/${project::get-name()}.xml">
<nowarn>
<warning number="${nowarn.numbers.test}" /> <!-- 1701 -->
<warning number="${nowarn.numbers.test},1587" if="${nant.settings.currentframework=='mono-2.0'}"/>
</nowarn>
<sources failonempty="true">
<include name="**/*.cs" />
<include name="../CommonAssemblyInfo.cs" />
</sources>
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
<include name="**/*.resx" />
<include name="**/*.xsd" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<exclude name="Data/**/*" />
<exclude name="obj/**/*" />
</resources>
<references basedir="${current.bin.dir}">
<include name="*.dll" />
<include name="System.Configuration.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Drawing.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Xml.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Web.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Web.Services.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Data.dll" if="${nant.settings.currentframework=='mono-2.0'}" />
<include name="System.Web.Abstractions.dll"/>
<include name="System.Web.Routing.dll"/>
<include name="C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll" />
<include name="C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll" />
<exclude name="${project::get-name()}.dll" />
<include name="${lib.dir}/nunit.core.interfaces.dll" />
<exclude name="System.Web.Extensions.dll" />
<exclude name="Spring.Web.Mvc.dll" />
<exclude name="Spring.Web.Mvc.Tests.dll" />
</references>
</csc>
<copy todir="${current.bin.dir}">
<fileset basedir="${project::get-base-directory()}/Data">
<include name="**/*.*" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${project::get-base-directory()}">
<include name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="test" depends="build">
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
<call target="common.run-tests" />
</target>
<!--
<target name="test" depends="build">
<nunit2outproc>
<formatter type="Plain" />
<formatter type="Xml" usefile="true" extension=".xml" outputdir="${current.bin.dir}/results" />
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll" />
</nunit2outproc>
</target>
-->
</project>