mirror of https://github.com/apache/activemq.git
235 lines
12 KiB
XML
235 lines
12 KiB
XML
<?xml version="1.0" ?>
|
|
<project name="openwire" default="build">
|
|
|
|
<!-- set build.date property to current date in format yyyy-MM-dd -->
|
|
<tstamp property="build.date" pattern="yyyy-MM-dd" />
|
|
|
|
<!-- global project settings -->
|
|
<property name="project.name" value="activemq-dotnet"/>
|
|
<property name="project.version" value="4.0" unless="${property::exists('project.version')}"/>
|
|
<property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}"/>
|
|
<property name="project.version.full" value="${project.version + if(project.release.type == 'release', '', '-' + project.release.type)}" dynamic="true" />
|
|
|
|
<!--
|
|
specifies whether the CommonAssemblyInfo.cs file should be created.
|
|
we do not want this for releases (whether they're beta or release) as
|
|
this would cause the build number to be updated
|
|
-->
|
|
<property name="create.assemblyinfo" value="true" />
|
|
|
|
<!-- global build settings -->
|
|
<property name="lib.dir" value="${path::combine(build.dir, 'bin/lib')}" dynamic="true" />
|
|
<property name="lib.family.dir" value="${path::combine(lib.dir, framework::get-family(framework::get-target-framework()))}" dynamic="true" />
|
|
<property name="lib.framework.dir" value="${path::combine(lib.family.dir, version::to-string(framework::get-version(framework::get-target-framework())))}" dynamic="true" />
|
|
|
|
<!-- default configuration -->
|
|
<property name="project.config" value="debug" /> <!-- debug|release -->
|
|
<property name="build.defines" value="" />
|
|
<property name="build.number" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2000'))))}" />
|
|
|
|
<!-- platform specific properties. These are the defaults -->
|
|
<property name="current.build.defines" value="${build.defines}" />
|
|
|
|
<!-- Named project configurations (used by self-test and self-doc tasks) -->
|
|
<target name="debug" description="Perform a 'debug' build">
|
|
<property name="project.config" value="debug" />
|
|
<property name="build.debug" value="true" />
|
|
<property name="build.dir" value="${project::get-base-directory()}/build/${framework::get-target-framework()}.${platform::get-name()}/${project.name}-${project.version}-${project.config}" />
|
|
</target>
|
|
|
|
<target name="release" description="Perform a 'release' build">
|
|
<property name="project.config" value="release" />
|
|
<property name="build.debug" value="false" />
|
|
<property name="build.dir" value="${project::get-base-directory()}/build/${project.name}-${project.version.full}" />
|
|
</target>
|
|
|
|
<!-- Framework support targets -->
|
|
<target name="set-framework-configuration">
|
|
<if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}">
|
|
<fail message="The '${framework::get-target-framework()}' framework is not supported by this version of ActiveMQ .NET" />
|
|
</if>
|
|
<call target="set-${framework::get-target-framework()}-framework-configuration" />
|
|
</target>
|
|
<target name="set-net-1.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="net-1.0" />
|
|
<property name="current.build.defines" value="${build.defines}NET,NET_1_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_0" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-net-1.1-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="net-1.1" />
|
|
<property name="current.build.defines" value="${build.defines}NET,NET_1_1" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_1" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-net-2.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="net-2.0" />
|
|
<property name="current.build.defines" value="${build.defines}NET,NET_2_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_1" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-netcf-1.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="netcf-1.0" />
|
|
<property name="current.build.defines" value="${build.defines}NETCF,NETCF_1_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_1" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-mono-1.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="mono-1.0" />
|
|
<property name="current.build.defines" value="${build.defines}MONO,MONO_1_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_1" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-mono-2.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="mono-2.0" />
|
|
<property name="current.build.defines" value="${build.defines}MONO,MONO_2_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_1" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
<target name="set-sscli-1.0-framework-configuration">
|
|
<property name="nant.settings.currentframework" value="sscli-1.0" />
|
|
<property name="current.build.defines" value="${build.defines}SSCLI,SSCLI_1_0" dynamic="true" />
|
|
<property name="link.sdkdoc.version" value="SDK_v1_0" />
|
|
<property name="link.sdkdoc.web" value="true" />
|
|
</target>
|
|
|
|
<!-- build tasks -->
|
|
<target name="init" description="Initializes build properties">
|
|
<call target="${project.config}" />
|
|
<call target="set-framework-configuration" />
|
|
</target>
|
|
|
|
<!-- cleans the build -->
|
|
<target name="clean" depends="init" description="Deletes build">
|
|
<delete dir="build" if="${directory::exists('build')}" />
|
|
</target>
|
|
|
|
<target name="create-common-assemblyinfo" if="${create.assemblyinfo}" depends="init" description="Generate CommonAssemblyInfo.cs">
|
|
|
|
<!-- ensure src/main/csharp/CommonAssemblyInfo.cs is writable if it already exists -->
|
|
<attrib file="src/main/csharp/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('src/main/csharp/CommonAssemblyInfo.cs')}" />
|
|
|
|
<!-- generate the source file holding the common assembly-level attributes -->
|
|
<asminfo output="src/main/csharp/CommonAssemblyInfo.cs" language="CSharp">
|
|
<imports>
|
|
<import namespace="System" />
|
|
<import namespace="System.Reflection" />
|
|
<import namespace="System.Runtime.InteropServices" />
|
|
</imports>
|
|
<attributes>
|
|
<attribute type="ComVisibleAttribute" value="false" />
|
|
<attribute type="CLSCompliantAttribute" value="false" />
|
|
<attribute type="AssemblyTitleAttribute" value="ActiveMQ .NET" />
|
|
<attribute type="AssemblyDescriptionAttribute" value="A .NET Library for talking to ActiveMQ" />
|
|
<attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />
|
|
<attribute type="AssemblyCompanyAttribute" value="http://activemq.org/" />
|
|
<attribute type="AssemblyProductAttribute" value="ActiveMQ" />
|
|
<attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2005-${datetime::get-year(datetime::now())} Apache Software Foundation" />
|
|
<attribute type="AssemblyTrademarkAttribute" value="" />
|
|
<attribute type="AssemblyCultureAttribute" value="" />
|
|
<attribute type="AssemblyVersionAttribute" value="${project.version}.${build.number}.0" />
|
|
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />
|
|
</attributes>
|
|
</asminfo>
|
|
|
|
<!-- ensure src/test/csharp/CommonAssemblyInfo.cs is writable if it already exists -->
|
|
<attrib file="src/test/csharp/CommonAssemblyInfo.cs" readonly="false" if="${file::exists('src/test/csharp/CommonAssemblyInfo.cs')}" />
|
|
|
|
<!-- generate the source file holding the common assembly-level attributes -->
|
|
<asminfo output="src/test/csharp/CommonAssemblyInfo.cs" language="CSharp">
|
|
<imports>
|
|
<import namespace="System" />
|
|
<import namespace="System.Reflection" />
|
|
<import namespace="System.Runtime.InteropServices" />
|
|
</imports>
|
|
<attributes>
|
|
<attribute type="ComVisibleAttribute" value="false" />
|
|
<attribute type="CLSCompliantAttribute" value="false" />
|
|
<attribute type="AssemblyTitleAttribute" value="ActiveMQ .NET Test" />
|
|
<attribute type="AssemblyDescriptionAttribute" value="A .NET Library for testing the ActiveMQ .NET Library" />
|
|
<attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />
|
|
<attribute type="AssemblyCompanyAttribute" value="http://activemq.org/" />
|
|
<attribute type="AssemblyProductAttribute" value="ActiveMQ" />
|
|
<attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2005-${datetime::get-year(datetime::now())} Apache Software Foundation" />
|
|
<attribute type="AssemblyTrademarkAttribute" value="" />
|
|
<attribute type="AssemblyCultureAttribute" value="" />
|
|
<attribute type="AssemblyVersionAttribute" value="${project.version}.${build.number}.0" />
|
|
<attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />
|
|
</attributes>
|
|
</asminfo>
|
|
|
|
</target>
|
|
|
|
<!-- Compile the main sources -->
|
|
<target name="build-main" depends="create-common-assemblyinfo">
|
|
|
|
<echo message="Build Directory is ${build.dir}" />
|
|
<mkdir dir="${build.dir}/bin" />
|
|
|
|
<csc target="library" define="${current.build.defines}" warnaserror="false" debug="${build.debug}" output="${build.dir}/bin/${project.name}.dll" doc="${build.dir}/bin/${project.name}.xml">
|
|
<nowarn>
|
|
<!-- do not report warnings for missing XML comments -->
|
|
<warning number="1591" />
|
|
<!-- do not report deprecation warnings -->
|
|
<warning number="0618" />
|
|
</nowarn>
|
|
<sources failonempty="true">
|
|
<include name="src/main/csharp/**/*.cs" />
|
|
<include name="src/main/csharp/CommonAssemblyInfo.cs" />
|
|
</sources>
|
|
<resources basedir="src/main/resources">
|
|
<include name="**/*"/>
|
|
</resources>
|
|
<!--
|
|
<references>
|
|
<include name="${build.dir}/bin/log4net.dll"/>
|
|
<include name="System.Web.dll"/>
|
|
</references>
|
|
-->
|
|
</csc>
|
|
</target>
|
|
|
|
<target name="build-test" depends="create-common-assemblyinfo, build-main">
|
|
<csc target="library" define="${current.build.defines}" warnaserror="false" debug="${build.debug}" output="${build.dir}/bin/${project.name}.test.dll">
|
|
<nowarn>
|
|
<!-- do not report warnings for missing XML comments -->
|
|
<warning number="1591" />
|
|
<!-- do not report deprecation warnings -->
|
|
<warning number="0618" />
|
|
</nowarn>
|
|
<sources failonempty="true">
|
|
<include name="src/test/csharp/**/*.cs" />
|
|
<include name="src/test/csharp/CommonAssemblyInfo.cs" />
|
|
</sources>
|
|
<resources basedir="src/test/resources">
|
|
<include name="**/*"/>
|
|
</resources>
|
|
<references defaultexcludes="true">
|
|
<include name="mscorlib.dll" />
|
|
<include name="System.dll" />
|
|
<include name="nunit.framework.dll" />
|
|
<include name="${build.dir}/bin/${project.name}.dll" />
|
|
</references>
|
|
<!--
|
|
<resources failonempty="false" basedir="Resources"
|
|
dynamicprefix="true" prefix="XML:">
|
|
<include name="**/*.xml" />
|
|
</resources>
|
|
-->
|
|
</csc>
|
|
</target>
|
|
|
|
<target name="build" depends="build-test">
|
|
</target>
|
|
|
|
<target name="test" depends="build-test">
|
|
<nunit2>
|
|
<formatter type="Plain" />
|
|
<test assemblyname="${build.dir}/bin/${project.name}.test.dll">
|
|
</test>
|
|
</nunit2>
|
|
</target>
|
|
|
|
|
|
</project>
|