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

311 lines (273 sloc) 12.999 kb
<?xml version="1.0" ?>
<project
name="NHibernateSolution"
default="build"
xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd"
>
<!--
Use this to determine if the key file NHibernate.key should be used to
sign the Assemblies. This defaults to false since users doing their own
build have _no_ copy of the private key. If they do their own private
builds then they should make their own key
-->
<property name="sign" value="false" />
<!--
These are used to set the correct Attributes in AssemblyInfo.cs.
-->
<property name="project.name" value="nhibernate" />
<property name="project.version.major" value="0" />
<property name="project.version.minor" value="3" />
<property name="project.version.build" value="0" />
<property name="project.version.revision" value="0" />
<property name="project.version" value="${project.version.major}.${project.version.minor}.${project.version.build}.${project.version.revision}" />
<!-- default configuration -->
<property name="project.config" value="debug" />
<!-- debug|release -->
<property name="build.defines" value="" />
<!-- named project configurations -->
<target name="debug" description="Perform a 'debug' build">
<property name="project.config" value="debug" />
<property name="build.debug" value="true" />
<property name="build.name" value="${project.name}-${project.version}-${project.config}" />
<property name="build.dir" value="${nant.project.basedir}/build/${project.name}-${project.version}" />
</target>
<target name="release" description="Perform a 'release' build">
<property name="project.config" value="release" />
<property name="build.debug" value="false" />
<property name="build.name" value="${project.name}-${project.version}" />
<property name="build.dir" value="${nant.project.basedir}/build/${project.name}-${project.version}" />
</target>
<target name="init" description="Initializes build properties">
<call target="${project.config}" />
<call target="set-runtime-configuration" />
</target>
<target name="clean" depends="init" description="Deletes current build">
<delete dir="${build.dir}" failonerror="false" />
</target>
<target name="cleanall" description="Deletes every build configuration">
<echo message="Deleting all builds from all configurations" />
<delete dir="build" failonerror="false" />
</target>
<target
name="build-external"
depends="init"
description="Builds code that NHibernate depends on but is not a core peice of NHibernate. The built dll/exes will be distributed in the external-bin folder so there should be no need for a user to build it."
>
<nant
buildfile="src/HashCodeProvider/HashCodeProvider.build"
target="build"
/>
</target>
<target name="build" depends="init" description="Builds current configuration">
<echo message="Current Directory is ${nant.project.basedir}" />
<echo message="Build Directory is ${build.dir}" />
<!-- prepare build directory -->
<mkdir dir="${build.dir}/bin" />
<!-- copy framework-nuetral libraries -->
<copy todir="${build.dir}/bin">
<fileset basedir="external-bin">
<includes name="log4net.*" />
<includes name="HashCodeProvider.*" />
<includes name="DotNetMock.*" />
<includes name="nunit.framework.*" />
<includes name="Commons.*" />
<includes name="NVelocity.*" />
<includes name="NAnt.Core.*" />
</fileset>
</copy>
<!-- copy framework-specific libraries -->
<!-- note that we are not targeting diff versions - only 1.1 and not mono yet -->
<nant
buildfile="src/NHibernate/NHibernate.build"
target="build"
/>
<nant
buildfile="src/NHibernate.DomainModel/NHibernate.DomainModel.build"
target="build"
/>
<nant
buildfile="src/NHibernate.Test/NHibernate.Test.build"
target="build"
/>
<nant
buildfile="src/NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net.build"
target="build"
/>
<nant
buildfile="src/NHibernate.Tasks/NHibernate.Tasks.build"
target="build"
/>
<nant
buildfile="src/NHibernate.Examples/NHibernate.Examples.build"
target="build"
/>
</target>
<target name="test" depends="build" description="Runs the tests contained in NHibernate.Test" >
<!-- make sure the config file is NOT readonly -->
<attrib file="${build.dir}/bin/NHibernate.Test.dll.config" readonly="false" />
<!--
Tell nhibernate how to connect to the test database.
-->
<xmlpoke
file="${build.dir}/bin/NHibernate.Test.dll.config"
xpath="/configuration/nhibernate/add[@key='hibernate.dialect']/@value"
value="${nhibernate.dialect}"
/>
<xmlpoke
file="${build.dir}/bin/NHibernate.Test.dll.config"
xpath="/configuration/nhibernate/add[@key='hibernate.connection.driver_class']/@value"
value="${nhibernate.connection.driver_class}"
/>
<xmlpoke
file="${build.dir}/bin/NHibernate.Test.dll.config"
xpath="/configuration/nhibernate/add[@key='hibernate.connection.connection_string']/@value"
value="${nhibernate.connection.connection_string}"
/>
<nant
buildfile="src/NHibernate.Test/NHibernate.Test.build"
target="test"
/>
<!--
Remove the connnection string information that was just entered...
-->
<xmlpoke
file="${build.dir}/bin/NHibernate.Test.dll.config"
xpath="/configuration/nhibernate/add[@key='hibernate.connection.connection_string']/@value"
value="conn string here"
/>
</target>
<target name="set-runtime-configuration">
<!--
We are not building for anything but the .net 1.1 framework right now
-->
<call target="set-net-1.1-runtime-configuration" />
<!--
<ifnot propertyexists="current.runtime.config">
<ifnot propertyexists="nant.settings.currentframework">
<fail message="No runtime configuration was specified and the default NAnt runtime is not available." />
</ifnot>
<ifnot targetexists="set-${nant.settings.currentframework}-runtime-configuration">
<fail message="No runtime configuration was specified and the current runtime (${nant.settings.currentframework}) is not supported by NAnt." />
</ifnot>
<call target="set-${nant.settings.currentframework}-runtime-configuration"/>
</ifnot>
<ifnot propertyexists="current.runtime.version">
<ifnot propertyexists="nant.settings.currentframework">
<fail message="No runtime configuration was specified and the default NAnt runtime is not available." />
</ifnot>
<ifnot targetexists="set-${nant.settings.currentframework}-runtime-configuration">
<fail message="No runtime configuration was specified and the current runtime (${nant.settings.currentframework}) is not supported by NDoc." />
</ifnot>
<call target="set-${nant.settings.currentframework}-runtime-configuration" />
</ifnot>
<ifnot targetexists="set-${current.runtime.config}-${current.runtime.version}-runtime-configuration">
<fail message="The ${current.runtime.config}-${current.runtime.version} runtime is not supported by NDoc." />
</ifnot>
<call target="set-${current.runtime.config}-${current.runtime.version}-runtime-configuration"/>
-->
</target>
<target name="set-runtime-configuration-flags">
<property name="current.runtime.config.net" value="false" />
<property name="current.runtime.config.netcf" value="false" />
<property name="current.runtime.config.mono" value="false" />
<property name="current.runtime.config.sscli" value="false" />
<property name="current.runtime.config.${current.runtime.config}" value="true" />
<property name="current.runtime.net-1.0" value="false" />
<property name="current.runtime.net-1.1" value="false" />
<property name="current.runtime.net-1.2" value="false" />
<property name="current.runtime.netcf-1.0" value="false" />
<property name="current.runtime.mono-1.0" value="false" />
<property name="current.runtime.sscli-1.0" value="false" />
<property name="current.runtime.${current.runtime.config}-${current.runtime.version}" value="true" />
</target>
<target name="set-net-1.1-runtime-configuration">
<property name="current.runtime.config" value="net" />
<property name="current.runtime.version" value="1.1" />
<property name="current.runtime.description" value="Microsoft .NET Framework 1.1" />
<property name="current.build.defines" value="${build.defines}NET,NET_1_1" />
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<property name="lib.dir" value="lib/${current.runtime.config}/${current.runtime.version}" />
<property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
<call target="set-runtime-configuration-flags" />
</target>
<target name="sdkdoc" depends="init" description="Generates MSDN sytle documentation">
<ndoc>
<assemblies basedir="${build.dir}/bin">
<includes name="NHibernate.dll" />
</assemblies>
<documenters>
<documenter name="MSDN">
<property name="OutputDirectory" value="${build.dir}/doc/sdk" />
<property name="HtmlHelpName" value="NHibernate-SDK" />
<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="SDK_v1_1" />
<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="" />
<property name="CopyrightHref" value="" />
<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="False" />
<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>
</target>
<target name="package" depends="test sdkdoc" description="Creates Zip files for the File Release System on SourceForge">
<copy todir="${build.dir}">
<fileset>
<includes name="external-bin/**" />
<!-- exclude the UnitTesting project that is no longer used -->
<excludes name="src/UnitTesting/**" />
<includes name="src/**" />
<includes name="NHibernateSolution.build" />
<includes name="lgpl.txt" />
<includes name="releasenotes.txt" />
<includes name="readme.html" />
<!-- exclude VS.NET stuff -->
<excludes name="**/*.suo" />
<excludes name="**/*j.user" />
<excludes name="**/bin/**" />
<excludes name="**/obj/**" />
<!-- exclude any keys that exist on the build machine -->
<excludes name="**/*.snk" />
</fileset>
</copy>
<property name="project.zip-path" value="${nant.project.basedir}/build/${build.name}.zip" />
<zip zipfile="${project.zip-path}">
<fileset basedir="${build.dir}">
<includes name="**/*" />
</fileset>
</zip>
<!-- delete the directory that was used to create the zip -->
<!--<delete dir="${build.dir}" />-->
<echo message="Create a '${project.config}' package as file://${project.zip-path}" />
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.