Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 1.0.0.M2
Fetching contributors…

Cannot retrieve contributors at this time

416 lines (358 sloc) 17.299 kb
<?xml version="1.0" ?>
<project name="Spring.Data.Gemfire" default="test">
<property name="root.dir" value="${project::get-base-directory()}" overwrite="false" />
<property name="deploy.dir" value="${root.dir}/../deploy" />
<property name="build.dir" value="${root.dir}/build" />
<property name="tool.dir" value="${root.dir}/tools" />
<property name="lib.dir" value="${root.dir}/lib" />
<property name="package.dir" value="${root.dir}/package" />
<property name="doc.dir" value="${root.dir}/doc" />
<property name="project.majorversion" value="1.0" />
<property name="project.patchversion" value="0" overwrite="false" />
<property name="project.buildnumber" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2010'))))}" />
<property name="project.version" value="${project.majorversion}.${project.patchversion}.${project.buildnumber}" overwrite="false" />
<!-- dev / alpha / beta# / rc# / release -->
<property name="project.releasetype" value="dev" overwrite="false" />
<property name="project.sign" value="false" overwrite="false" />
<if test="${project.sign and not(file::exists(root.dir + '/Spring.Net.snk'))}">
<fail message="project.sign='true' but keyfile ${root.dir+'/Spring.Net.snk'} is missing" />
</if>
<readregistry property="net35.install.dir" key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\InstallPath" hive="LocalMachine" failonerror="true"/>
<property name="msbuild.exe" value="${net35.install.dir}\msbuild.exe"/>
<property name="thirdparty.libs.spring" value="C:\sourceforge\Spring.NET\trunk\build\net\2.0\debug" />
<!-- readregistry property="vs2008.install.dir" key="SOFTWARE\Microsoft\VisualStudio\9.0\InstallDir" hive="LocalMachine" failonerror="false"/ -->
<property name="buildconfiguration" value="Debug" />
<!-- force net-3.5 -->
<!-- <property name="nant.settings.currentframework" value="net-3.5"/>-->
<target name="update-dependencies">
<copy todir="${lib.dir}/net/2.0">
<fileset basedir="${thirdparty.libs.spring}">
<include name="Spring.*.dll"/>
<include name="Spring.*.pdb"/>
<exclude name="*.Tests.???" />
<exclude name="*.Tests.Integration.???" />
</fileset>
</copy>
</target>
<target name="build" depends="clean">
<call target="update-common-assemblyinfo" />
<call target="RebuildAllSolutions" />
</target>
<target name="update-common-assemblyinfo">
<!-- ensure src/CommonAssemblyInfo.cs is writable if it already exists -->
<attrib file="${root.dir}/src/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('${root.dir}/src/CommonAssemblyInfo.cs')}" />
<!-- generate the source file holding the common assembly-level attributes -->
<asminfo output="${root.dir}/src/CommonAssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.InteropServices" />
<import namespace="System.Security" />
<import namespace="System.Security.Permissions" />
</imports>
<attributes>
<attribute type="CLSCompliantAttribute" value="true" />
<attribute type="ComVisibleAttribute" value="false" />
<attribute type="AllowPartiallyTrustedCallersAttribute" asis="true"/>
<!-- attribute type="SecurityTransparentAttribute" asis="true"/ -->
<attribute type="SecurityPermissionAttribute" value="SecurityAction.RequestMinimum" asis="true"/>
<attribute type="AssemblyCompanyAttribute" value="http://springsource.org/spring-gemfire/" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright 2010 SpringSource." />
<attribute type="AssemblyTrademarkAttribute" value="Apache License, Version 2.0" />
<attribute type="AssemblyCultureAttribute" value="" />
<attribute type="AssemblyVersionAttribute" value="${project.version}" />
<attribute type="AssemblyConfigurationAttribute" value="${framework::get-target-framework()}.${platform::get-name()}; ${project.releasetype}" />
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}; ${framework::get-target-framework()}.${platform::get-name()}; ${project.releasetype}" />
<attribute type="AssemblyDelaySignAttribute" value="false" />
</attributes>
</asminfo>
</target>
<target name="test" depends="build">
<call target="TestAllAssemblies" />
</target>
<target name="test-integration" depends="test">
<delete>
<fileset basedir="${build.dir}">
<include name="*.dll-TestCoverage.xml" />
</fileset>
</delete>
<call target="IntegrationTestAllAssemblies" />
</target>
<target name="daily" depends="test">
</target>
<target name="clean">
<delete dir="${build.dir}" />
<foreach item="Folder" property="dirname">
<in>
<items basedir="${root.dir}">
<exclude name="tools/**" />
<include name="src/**/bin" />
<include name="test/**/bin" />
<include name="example/**/bin" />
<include name="**/obj" />
<include name="**/PreCompiledWeb" />
</items>
</in>
<do>
<delete dir="${dirname}" />
</do>
</foreach>
</target>
<target name="package-zip" depends="package" description="Build Package distribution as .zip file">
<property name="project.zip-path" value="${package.dir}/Spring.Data.GemFire-${project.version}.zip"/>
<zip zipfile="${project.zip-path}">
<fileset basedir="${package.dir}">
<include name="**/*"/>
<exclude name="*.zip"/>
</fileset>
</zip>
</target>
<target name="package" description="Builds all modules and documentation">
<!-- clean package dir -->
<delete dir="${package.dir}" failonerror="true" />
<!-- build and copy binaries -->
<call target="package.binaries" cascade="false" />
<!-- copy sources -->
<call target="package.sources" cascade="false" />
<!-- copy reference docs -->
<call target="package.doc" cascade="false"/>
<!-- build 3rd party lib -->
<copy todir="${package.dir}/lib">
<fileset basedir="${root.dir}/lib">
<include name="**/*"/>
</fileset>
</copy>
<!-- copy over readme etc. -->
<copy todir="${package.dir}" file="${root.dir}/readme.txt"/>
<copy todir="${package.dir}" file="${root.dir}/license.txt"/>
<copy todir="${package.dir}" file="${root.dir}/changelog.txt"/>
<!-- TODO: JUST FOR TESTING! -->
<!-- copy todir="${package.dir}\modules" file="${project.basedir}/modules/Common.Net.snk"/ -->
<!-- copy todir="${package.dir}\modules">
<fileset basedir="${project.basedir}\modules">
<include name="**/lib/**/Microsoft.*"/>
</fileset>
</copy -->
</target>
<target name="package.binaries" depends="build">
<echo message="hello ${package.dir}/bin/net/2.0/debug"/>
<copy todir="${package.dir}/bin/net/2.0/debug" flatten="true" verbose="true">
<fileset>
<include name="src/Spring.Data.GemFire/**/Debug/Spring.Data.GemFire*.???"/>
<exclude name="**/*Test*"/>
<exclude name="**/*FileListAbsolute*"/>
</fileset>
</copy>
</target>
<target name="package.sources">
<!-- Copy global solution + build files -->
<copy todir="${package.dir}">
<fileset basedir="${root.dir}">
<include name="Spring.Data.GemFire*"/>
<exclude name="*.snk"/>
<exclude name="*.suo"/>
<exclude name="*.user"/>
<exclude name="*.cache"/>
<exclude name="*.ndoc"/>
<exclude name="*.build"/>
</fileset>
</copy>
<!-- Copy shared module files -->
<copy tofile="${package.dir}/src/CommonAssemblyInfo.cs"
file="${root.dir}/src/CommonAssemblyInfo.cs.template"/>
<!-- Copy sources -->
<copy todir="${package.dir}" failonerror="true" >
<fileset basedir="${root.dir}">
<include name="src/**/*.*"/>
<include name="test/**/*.*"/>
<include name="example/**/*.*"/>
<exclude name="**/*.user"/>
<exclude name="src/**/Debug/*" />
<exclude name="test/**/Debug/*" />
<exclude name="example/**/Debug/*" />
</fileset>
</copy>
</target>
<target name="package.doc">
<!-- copy reference docs -->
<call target="doc" cascade="false"/>
<copy todir="${package.dir}/doc/reference/">
<fileset basedir="${doc.dir}/reference/target/">
<include name="**/*"/>
</fileset>
</copy>
<!-- copy sdk docs -->
<copy todir="${package.dir}/doc/api/html">
<fileset basedir="${doc.dir}/api/target/msdn/">
<include name="**/*"/>
<exclude name="*.chw" />
<exclude name="*.hhc" />
<exclude name="*.hhk" />
<exclude name="*.hhp" />
<exclude name="*.chm" />
<exclude name="ndoc3_msdn_temp" />
</fileset>
</copy>
<copy todir="${package.dir}/doc/api/htmlhelp">
<fileset basedir="${doc.dir}/api/target/msdn/">
<include name="*.chm"/>
</fileset>
</copy>
</target>
<target name="doc">
<call target="doc-reference" cascade="false" />
<call target="doc-sdk" cascade="false" />
</target>
<target name="doc-reference">
<nant buildfile="${doc.dir}/reference/docbook.build" target="all" />
</target>
<target name="doc-sdk">
<echo message="Creating SDK Documentation for Spring.Data.GemFire." />
<exec workingdir="." program="${tool.dir}/ndoc3/NDoc3Console.exe" verbose="true">
<!-- arg value="-verbose" /-->
<!-- arg value="-documenter=MSDN" /-->
<arg value="-project=${root.dir}/Spring.Data.GemFire.ndoc" />
</exec>
</target>
<target name="common.run-tests">
<call target="common.run-tests.nunit" />
<!--
<call target="common.run-tests.ncover" />
-->
</target>
<!--
*******************************************************************************
Runs NUnit unit test configuration of the current ${project::get-name()}.dll
Arguments:
${build.dir}: the binary directory to pick the assembly + app.config from
${test.assemblyname} : (optional), the name of the assembly, if not specified uses "project:get-name()"
${tool.dir} : dir for tools
-->
<target name="common.run-tests.nunit">
<property name="test.assemblyname" value="${project::get-name()}" overwrite="false" />
<property name="test.assemblyfile" value="${test.assemblyname}.dll" overwrite="true" />
<property name="test.bin.dir" value="${build.dir}" if="${not property::exists('test.bin.dir')}" />
<echo message="Unit Testing ${test.assemblyname} in ${test.bin.dir}" />
<exec program="${tool.dir}/nunit/net-2.0/nunit-console-x86.exe" workingdir="${test.bin.dir}" verbose="true">
<arg line="${test.assemblyfile}" />
<arg value="/xml:${test.assemblyname}.dll-TestResults.xml" />
<arg value="/nologo" />
<arg value="/noshadow" />
<!--
<arg value="/framework:${nant.settings.currentframework}" />
-->
<arg value="/framework:net-2.0" />
</exec>
</target>
<!--
*******************************************************************************
Runs coverage unit test configuration of the current ${project::get-name()}.dll
Arguments:
${current.bin.dir}: the binary directory to pick the assembly + app.config from
${project.name} : (optional), the name of the assembly
${tool.dir} : dir for tools
-->
<target name="common.run-tests.ncover" description="Run NUnit tests">
<property name="test.assemblyname" value="${project::get-name()}" overwrite="false" />
<property name="test.assemblyfile" value="${test.assemblyname}.dll" overwrite="true" />
<property name="test.bin.dir" value="${build.dir}" if="${not property::exists('test.bin.dir')}" />
<echo message="Coverage Testing ${test.assemblyname} from ${test.bin.dir}/${test.assemblyfile}" />
<property name="test.assemblyname.tocover" value="${string::substring(test.assemblyname,0,string::last-index-of(test.assemblyname, '.Tests') )}" overwrite="false" />
<exec program="${tool.dir}/ncover/ncover.console.exe" workingdir="${test.bin.dir}" verbose="true">
<arg value="//q" />
<arg value="//reg" />
<arg value="//w" />
<arg path="${test.bin.dir}" />
<arg value="//x" />
<arg path="${test.bin.dir}/${test.assemblyname}.dll-TestCoverage.xml" />
<arg value="//a" />
<arg value="${test.assemblyname.tocover}" />
<arg value="//ea" />
<arg value="CoverageExcludeAttribute" />
<arg value="//q" />
<arg path="${tool.dir}/nunit/net-2.0/nunit-console-x86.exe" />
<arg line="${test.assemblyfile}" />
<arg value="/xml:${test.assemblyname}.dll-TestResults.xml" />
<arg value="/nologo" />
<arg value="/noshadow" />
<!--
<arg value="/framework:${nant.settings.currentframework}" />
-->
<arg value="/framework:net-2.0" />
</exec>
</target>
<target name="TestAllAssemblies">
<foreach item="File" property="filename">
<in>
<items basedir="${build.dir}">
<include name="**\*.Tests.dll" />
</items>
</in>
<do>
<property name="test.assemblyname" value="${path::get-file-name-without-extension(filename)}" />
<call target="common.run-tests" />
</do>
</foreach>
<!-- build coverage summary -->
<!--
<exec program="${tool.dir}/ncoverexplorer/ncoverexplorer.console.exe" workingdir="${build.dir}" failonerror="false">
<arg value="/xml:&quot;${build.dir}/TestCoverageSummary.xml&quot;" />
<arg value="/report:ModuleClassFunctionSummary" />
<arg value="/sort:4" />
<arg value="/minCoverage:80" />
<arg value="/q" />
<arg path="${build.dir}/*-TestCoverage.xml" />
</exec>
-->
</target>
<target name="IntegrationTestAllAssemblies">
<foreach item="File" property="filename">
<in>
<items basedir="${build.dir}">
<include name="*.Tests.Integration.dll" />
</items>
</in>
<do>
<property name="test.assemblyname" value="${path::get-file-name-without-extension(filename)}" />
<call target="common.run-tests" />
</do>
</foreach>
<!-- build coverage summary -->
<exec program="${tool.dir}/ncoverexplorer/ncoverexplorer.console.exe" workingdir="${build.dir}" failonerror="false">
<arg value="/xml:&quot;${build.dir}/TestCoverageSummary.xml&quot;" />
<arg value="/html:&quot;${build.dir}/TestCoverageSummary.html&quot;" />
<arg value="/report:ModuleClassFunctionSummary" />
<arg value="/sort:4" />
<arg value="/minCoverage:80" />
<arg value="/q" />
<arg path="${build.dir}/*-TestCoverage.xml" />
</exec>
</target>
<target name="RebuildAllSolutions" depends="clean">
<foreach item="File" property="filename">
<in>
<items basedir="${root.dir}">
<exclude name="tools/**" />
<include name="**/*.sln" />
</items>
</in>
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution" />
</do>
</foreach>
</target>
<target name="RebuildSolution" description="rebuilds a given solution file">
<echo message="Rebuilding Solution ${solutionfile}" />
<exec program="${msbuild.exe}">
<!--
<arg value="/property:OutDir=${output.dir}/"/>
-->
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/property:SignAssembly=${project.sign},AssemblyOriginatorKeyFile=${root.dir}/Spring.Net.snk" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
</exec>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.