activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r590274 - /activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml
Date Tue, 30 Oct 2007 19:09:05 GMT
Author: chirino
Date: Tue Oct 30 12:09:01 2007
New Revision: 590274

URL: http://svn.apache.org/viewvc?rev=590274&view=rev
Log:
Adding missing file

Added:
    activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml

Added: activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml?rev=590274&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml (added)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/build-common.xml Tue Oct 30 12:09:01 2007
@@ -0,0 +1,412 @@
+<?xml version="1.0" ?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+   
+    http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://nant.sourceforge.net/release/0.85/nant.xsd">
+  
+  <!-- ============================================================================================
-->
+  <!--    I N I T I A L I Z A T I O N    T A R G E T S                               
              -->
+  <!-- ============================================================================================
-->
+
+  <!-- global project settings -->  
+  <property name="project.cls.compliant" value="true" unless="${property::exists('project.cls.compliant')}"/>
+  <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" />
+  <property name="build.dir"             value="${basedir}/build" />
+  <property name="doc.dir"               value="${build.dir}/doc" />
+  <property name="lib.dir"               value="${path::combine(basedir, '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="build.defines"           value=""/>
+  <property name="build.noskip"            value="false"/>
+  <property name="build.skip"              value="false"/>
+  <property name="current.build.config"    value="${if(project.release.type == 'release',
'release', 'debug')}"/>
+  <property name="current.build.framework" value="${framework::get-target-framework()}"/>
+  <property name="current.build.defines"   value="${build.defines}" />
+
+  <!-- Helper targets used to enable build configurations -->
+  <target name="set-noskip-configuration" description="Disable skiping builds">
+    <property name="project.noskip"         value="true" />
+  </target>
+  
+  <target name="set-debug-configuration" description="Enabled 'debug' builds">
+    <property name="current.build.config"         value="debug" />
+    <property name="current.build.config.debug"   value="true" />
+    <property name="current.build.config.release" value="false" />
+    <property name="csc.debug"                    value="true" />
+  </target>
+  
+  <target name="set-release-configuration" description="Enabled 'release' builds">
+    <property name="current.build.config"         value="release" />
+    <property name="current.build.config.release" value="true" />
+    <property name="current.build.config.debug"   value="false" />
+    <property name="csc.debug"                    value="true" />
+  </target>
+  
+  <target name="set-net-1.0-framework-configuration">
+    <property name="current.build.framework" value="net-1.0" />
+    <property name="current.build.framework.name" value=".NET 1.0"/>
+    <property name="current.build.defines" value="${build.defines}NET,NET_1_0" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="true" />
+    <property name="link.sdkdoc.version" value="SDK_v1_0" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-net-1.1-framework-configuration">
+    <property name="current.build.framework" value="net-1.1" />
+    <property name="current.build.framework.name" value=".NET 1.1"/>
+    <property name="current.build.defines" value="${build.defines}NET,NET_1_1" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="true" />
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-net-2.0-framework-configuration">
+    <property name="current.build.framework" value="net-2.0" />
+    <property name="current.build.framework.name" value=".NET 2.0"/>
+    <property name="current.build.defines" value="${build.defines}NET,NET_2_0" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="true"/>
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-netcf-1.0-framework-configuration">
+    <property name="current.build.framework" value="netcf-1.0" />
+    <property name="current.build.framework.name" value=".NET Compact Framework 1.0"/>
+    <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_1_0"
dynamic="true" />
+    <property name="current.build.framework.sign" value="false" />
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-netcf-2.0-framework-configuration">
+    <property name="current.build.framework" value="netcf-2.0" />
+    <property name="current.build.framework.name" value=".NET Compact Framework 2.0"/>
+    <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_2_0"
dynamic="true" />
+    <property name="current.build.framework.sign" value="false" />
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-mono-1.0-framework-configuration">
+    <property name="current.build.framework" value="mono-1.0" />
+    <property name="current.build.framework.name" value="Mono 1.0"/>
+    <property name="current.build.defines" value="${build.defines}MONO,MONO_1_0" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="true" />
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-mono-2.0-framework-configuration">
+    <property name="current.build.framework" value="mono-2.0" />
+    <property name="current.build.framework.name" value="Mono 2.0"/>
+    <property name="current.build.defines" value="${build.defines}MONO,MONO_2_0" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="true" />
+    <property name="link.sdkdoc.version" value="SDK_v1_1" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+  
+  <target name="set-sscli-1.0-framework-configuration">
+    <property name="current.build.framework" value="sscli-1.0" />
+    <property name="current.build.framework.name" value="sscli 1.0"/>
+    <property name="current.build.defines" value="${build.defines}SSCLI,SSCLI_1_0" dynamic="true"
/>
+    <property name="current.build.framework.sign" value="false" />
+    <property name="link.sdkdoc.version" value="SDK_v1_0" />
+    <property name="link.sdkdoc.web" value="true" />
+    <if test="${framework::exists(current.build.framework)}">
+      <property name="nant.settings.currentframework" value="${current.build.framework}"
/>
+    </if>
+  </target>
+
+  <target name="release-init" description="Initializes release build properties">
+    <property name="snk.file"  value="${basedir}/activemq-dotnet.snk" />
+    <if test="${not file::exists(snk.file)}">
+      <if test="${build.noskip}">
+    <fail message="Release key file not found. You can generate a key file by running
'sn -k ${snk.file}'." />
+      </if>
+      <if test="${not(build.noskip)}">
+        <echo message="Release key file not found. You can generate a key file by running
'sn -k ${snk.file}'." />
+        <echo message="The Release build will be skipped." />
+        <property name="build.skip.release" value="true"/>
+      </if>
+    </if>
+    <if test="${file::exists(snk.file)}">
+      <property name="build.skip.release" value="false" />
+    </if>
+  </target>
+
+  <target name="init" description="Initializes build properties">
+    <!-- enabled the release or debug configuration -->
+    <call target="set-${current.build.config}-configuration"/>
+
+    <!-- Check to see if our build setup for the target framework -->
+    <if test="${not(target::exists('set-'+current.build.framework+'-framework-configuration'))}">
+      <fail message="The '${current.build.framework}' framework is not supported by this
version of ActiveMQ .NET" />
+    </if>
+    <call target="set-${current.build.framework}-framework-configuration" />
+
+    <!-- Check to see current platform supports the target framework -->
+    <if test="${framework::exists(current.build.framework)}">
+       <!-- Make sure that the activemq-dotnet.snk exists for release builds -->
+       <if test="${current.build.config.release}">
+     <call target="release-init"/>
+     <property name="build.skip" value="${build.skip.release}" />
+       </if>
+       <if test="${not current.build.config.release}">
+         <property name="build.skip" value="false" />
+       </if>
+    </if>
+    <if test="${not framework::exists(current.build.framework)}">
+       <if test="${build.noskip}">
+      <fail message="${current.build.framework.name} is not available." />
+       </if>
+       <if test="${not(build.noskip)}">
+      <echo message="${current.build.framework.name} is not available. Build skipped."
/>
+          <property name="build.skip" value="true"/>
+       </if>
+    </if>
+
+    <if test="${not(build.skip)}">
+       <property name="current.build.keysign" value="${current.build.config=='release'
and current.build.framework.sign}"/>
+       <echo message="Doing ${if(current.build.keysign,'a signed','an unsigned')} ${current.build.config}
build for the ${current.build.framework.name} framework" />
+       <property name="build.bin.dir" value="${basedir}/build/${nant.settings.currentframework}/${current.build.config}"
/>
+       <mkdir dir="${build.bin.dir}"/>
+       <call target="dependency-init"/>
+    </if>
+  </target>
+  
+  <!-- ============================================================================================
-->
+  <!--     C O M P I L E    T A R G E T S                                            
              -->
+  <!-- ============================================================================================
-->
+  <target name="compile-all" depends="release-init" description="Compile all build configurations
for all runtime configurations">
+    <echo message="Compiling all build configurations for all runtime configurations."
/>
+    <call target="set-debug-configuration" />
+    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile"
/>
+    <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile"
/>
+    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile"
/>
+    <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile"
/>
+    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile"
/>
+    <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile"
/>
+
+    <!-- we can only do a release skip if the Key file is available -->
+    <if test="${not build.skip.release}">
+      <call target="set-release-configuration" />
+      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile"
/>
+      <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile"
/>
+      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile"
/>
+      <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile"
/>
+      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile"
/>
+      <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile"
/>
+    </if>
+  </target>
+  
+  <target name="conditional-compile" depends="init" unless="${build.skip}"
+      description="Conditionaly compiles all the modules if build framework and type are
supported">
+    <call target="compile" />
+  </target>  
+
+  <target name="compile" depends="compile-main,compile-test" description="Compile everything"/>
+
+  <target name="compile-main" depends="init" description="Build the main library">
+    <echo message="Building the ${project.name} library"/>
+    
+    <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="${project.cls.compliant}"
/>
+        <attribute type="AssemblyTitleAttribute"         value="${project.short_description}"
/>
+        <attribute type="AssemblyDescriptionAttribute"   value="${project.description}"
/>
+        <attribute type="AssemblyConfigurationAttribute" value="${project.release.type}"
/>
+        <attribute type="AssemblyCompanyAttribute"       value="http://activemq.apache.org/nms"
/>
+        <attribute type="AssemblyProductAttribute"       value="${project.short_description}"
/>
+        <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}" />
+        <attribute type="AssemblyInformationalVersionAttribute" value="${project.version}"
/>
+      </attributes>
+    </asminfo>
+
+    <csc if="${current.build.keysign}" keyfile="default.snk" target="library"
+      define="${current.build.defines}" warnaserror="false" debug="${csc.debug}"
+      output="${build.bin.dir}/${project.name}.dll" doc="${build.bin.dir}/${project.name}.xml">
+      <nowarn>
+        <warning number="1591" /> <!-- do not report warnings for missing XML comments
-->
+        <warning number="0618" /> <!-- do not report deprecation warnings -->
+      </nowarn>
+      <sources failonempty="true">
+        <include name="src/main/csharp/**.cs" />
+      </sources>
+      <resources failonempty="true">
+        <include name="NOTICE.txt" />
+        <include name="LICENSE.txt" />
+      </resources>
+      <references refid="dependencies"/>
+    </csc>
+    <csc if="${not current.build.keysign}" target="library"
+      define="${current.build.defines}" warnaserror="false" debug="${csc.debug}"
+      output="${build.bin.dir}/${project.name}.dll" doc="${build.bin.dir}/${project.name}.xml">
+      <nowarn>
+    <warning number="1591" /> <!-- do not report warnings for missing XML comments
-->
+    <warning number="0618" /> <!-- do not report deprecation warnings -->
+      </nowarn>
+      <sources failonempty="true">
+        <include name="src/main/csharp/**.cs" />
+      </sources>
+      <resources failonempty="true">
+        <include name="NOTICE.txt" />
+        <include name="LICENSE.txt" />
+      </resources>
+      <references refid="dependencies"/>
+    </csc>
+  </target>
+
+  <!-- Compile the nms-test module -->
+  <target name="compile-test" depends="compile-main" description="Build the test library">
+    <echo message="Building the ${project.name}.Test library" />
+
+    <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="${project.cls.compliant}"
/>
+        <attribute type="AssemblyTitleAttribute"         value="${project.short_description}"
/>
+        <attribute type="AssemblyDescriptionAttribute"   value="${project.description}"
/>
+        <attribute type="AssemblyConfigurationAttribute" value="${project.release.type}"
/>
+        <attribute type="AssemblyCompanyAttribute"       value="http://activemq.apache.org/nms"
/>
+        <attribute type="AssemblyProductAttribute"       value="${project.short_description}"
/>
+        <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}" />
+        <attribute type="AssemblyInformationalVersionAttribute" value="${project.version}"
/>
+      </attributes>
+    </asminfo>
+
+    <csc if="${current.build.keysign}" keyfile="default.snk" target="library"
+      define="${current.build.defines}" warnaserror="false" debug="${csc.debug}"
+      output="${build.bin.dir}/${project.name}.Test.dll" doc="${build.bin.dir}/${project.name}.Test.xml">
+      <nowarn>
+        <warning number="1591" /> <!-- do not report warnings for missing XML comments
-->
+        <warning number="0618" /> <!-- do not report deprecation warnings -->
+      </nowarn>
+      <sources failonempty="true">
+          <include name="src/test/csharp/**.cs" />
+      </sources>
+      <resources failonempty="true">
+        <include name="NOTICE.txt" />
+        <include name="LICENSE.txt" />
+      </resources>
+      <references refid="test.dependencies"/>
+    </csc>
+    <csc if="${not current.build.keysign}" target="library"
+      define="${current.build.defines}" warnaserror="false" debug="${csc.debug}"
+      output="${build.bin.dir}/${project.name}.Test.dll" doc="${build.bin.dir}/${project.name}.Test.xml">
+      <nowarn>
+        <warning number="1591" /> <!-- do not report warnings for missing XML comments
-->
+        <warning number="0618" /> <!-- do not report deprecation warnings -->
+      </nowarn>
+      <sources failonempty="true">
+        <include name="src/test/csharp/**.cs" />
+      </sources>
+      <resources failonempty="true">
+        <include name="NOTICE.txt" />
+        <include name="LICENSE.txt" />
+      </resources>
+      <references refid="test.dependencies"/>
+    </csc>
+  </target>
+
+    
+  <!-- ============================================================================================
-->
+  <!--      M I S C E L L A N E O U S    T A R G E T S                               
              -->
+  <!-- ============================================================================================
-->
+
+  <target name="clean" description="Deletes build">
+    <delete dir="build" if="${directory::exists('build')}" />
+  </target>
+  
+  <target name="doc" depends="compile">
+    <mkdir dir="${doc.dir}"/>
+    <ndoc failonerror="false">
+      <assemblies basedir="${build.bin.dir}">
+        <include name="${project.name}.dll" />
+      </assemblies>
+      <summaries basedir="${basedir}/src/main/ndoc">
+        <include name="NamespaceSummary.xml" />
+      </summaries>
+      <documenters>
+        <documenter name="MSDN">
+        <property name="OutputDirectory" value="${doc.dir}" />
+          <property name="HtmlHelpName" value="${project.name}" />
+          <property name="HtmlHelpCompilerFilename" value="hhc.exe" />
+          <property name="IncludeFavorites" value="False" />
+          <property name="Title" value="${project.short_description}" />
+          <property name="SplitTOCs" value="False" />
+          <property name="DefaulTOC" value="" />
+          <!--
+            <property name="ShowVisualBasic" value="True" />
+            <property name="ShowMissingSummaries" value="True" />
+            <property name="ShowMissingRemarks" value="True" />
+            <property name="ShowMissingParams" value="True" />
+            <property name="ShowMissingReturns" value="True" />
+            <property name="ShowMissingValues" value="True" />
+          -->
+          <property name="DocumentInternals" value="False" />
+          <property name="DocumentProtected" value="True" />
+          <property name="DocumentPrivates" value="False" />
+          <property name="DocumentEmptyNamespaces" value="False" />
+          <property name="IncludeAssemblyVersion" value="False" />
+          <property name="CopyrightText" value="" />
+          <property name="CopyrightHref" value="" />
+        </documenter>
+      </documenters>
+    </ndoc>
+  </target>
+  
+</project>
\ No newline at end of file



Mime
View raw message