This file contains common tasks tailored specifically for the Castle
build process. The goal was to define all the actions in this file, so
that actual project build files only have to configure a few variables
and call tasks in this file.
Usage
<property name="root.dir" value="../.." />
<include buildfile="${root.dir}/build-common/common-project.xml" />
These lines should be placed at the top level under the <project>
element. Property root.dir defines a relative path to the root of the
distribution, that is, Castle directory.
After including the file, a target should be defined to initialize
configuration variables according to the project being built.
The standard of this target is init (but any other name can be chosen).
The init target should depend on (or call) target common.init defined
in this file.
Other predefined targets are:
- common.compile-tests
compile NUnit tests and copy App.config file to the output directory,
if it exists.
- common.compile-dll
compile a DLL, generating the documentation and using Clover if enabled.
- common.generate-assemblyinfo, common.generate-assemblyinfoversion
generate an AssemblyInfo.cs or AssemblyInfoVersion.cs file from
assembly.* NAnt properties.
- common.run-tests
run compiled NUnit tests.
All compile/run targets put the output in build.dir. Common.compile*
targets use source fileset with id="project.sources", assembly fileset
with id="project.references" and resource fileset with id="project.resources"
to compile the project. The source and resource filesets are optional.