Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

468 lines (405 sloc) 18.447 kb
<?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="HashCodeProvider/HashCodeProvider.build" />
<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">
<!--
<nant target="test">
<buildfiles refid="buildfiles.tests" />
</nant>
-->
<!-- -->
<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" description="Modifies AssemblyInfo.cs files to work with Visual Studio">
<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>
Jump to Line
Something went wrong with that request. Please try again.