activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r709071 - in /activemq/activemq-dotnet/Apache.NMS/trunk: nant-common.xml nant.build vs2008-nms.csproj
Date Thu, 30 Oct 2008 01:18:57 GMT
Author: jgomes
Date: Wed Oct 29 18:18:57 2008
New Revision: 709071

URL: http://svn.apache.org/viewvc?rev=709071&view=rev
Log:
Refactored NAnt script to install locally compiled assemblies into local repository.  Integrated
Visual Studio build process to use the NAnt script to install newly compiled assemblies automatically.

Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml?rev=709071&r1=709070&r2=709071&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Wed Oct 29 18:18:57 2008
@@ -24,7 +24,7 @@
   <!-- 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="project.version.full"  value="${project.version + if(project.release.type
== 'snapshot', '-' + 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"
/>
@@ -34,10 +34,19 @@
   <!-- default configuration -->
   <property name="build.defines"           value=""/>
   <property name="build.noskip"            value="false"/>
-  <property name="build.skip"              value="false"/>
+  <property name="build.skip.release"      value="false" unless="${property::exists('build.skip.release')}"
/>
+  <property name="compile.skip"            value="false" unless="${property::exists('compile.skip')}"
/>
   <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}" />
+  <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+
+  <if test="${build.skip.release}">
+    <property name="build.config.strings"    value="debug"/>
+  </if>
+  <if test="${not(build.skip.release)}">
+    <property name="build.config.strings"    value="debug,release"/>
+  </if>
 
   <!-- Figure out the user's HOME directory -->
   <property name="user.home" value="${environment::get-variable('HOME')}"
@@ -59,12 +68,6 @@
   <property name="nant.local.repo" value="${user.home}/.nant/repository"
             unless="${property::exists('nant.local.repo')}"/>
 
-  <property name="nant.remote.repo" value="${environment::get-variable('NANT_REMOTE_REPO')}"
-                      if="${environment::variable-exists('NANT_REMOTE_REPO')}"
-                      unless="${property::exists('nant.remote.repo')}"/>
-  <property name="nant.remote.repo" value="http://people.apache.org/~chirino/nant-repo"
-          unless="${property::exists('nant.remote.repo')}"/>
-
   <!-- Nant Repo Tasks -->
   <target name="repo-download" description="Download a dependency from the remote repo
to the local repo">
     <fail message="The repo.task.artifact variable has not been set.  Please set it before
you call this task." unless="${property::exists('repo.task.artifact')}"/>
@@ -104,15 +107,6 @@
             if="${environment::variable-exists('ACTIVEMQ_DOTNET_SNK')}"
             unless="${property::exists('snk.file')}"/>
     <property name="snk.file"  value="${basedir}/activemq-dotnet.snk" if="${not property::exists('snk.file')}"/>
-    <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 activemq-dotnet.snk'.  Then set the ACTIVEMQ_DOTNET_SNK environment variable to the
full pathname of the file." />
-      </if>
-      <property name="build.skip.release" value="true" />
-    </if>
-    <if test="${file::exists(snk.file)}">
-      <property name="build.skip.release" value="false" />
-    </if>
   </target>
 
   <target name="init" description="Initializes build properties">
@@ -128,10 +122,8 @@
     <!-- 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"/>
-       </if>
-       <property name="build.skip" value="false" />
+       <call target="release-init"/>
+       <property name="build.skip" value="false"/>
     </if>
     <if test="${not framework::exists(current.build.framework)}">
        <if test="${build.noskip}">
@@ -151,20 +143,20 @@
       </if>
     </if>
 
+   <property name="current.build.keysign" value="${current.build.config=='release' and
file::exists(snk.file) and current.build.framework.sign}"/>
+   <property name="build.bin.dir" value="${basedir}/build/${nant.settings.currentframework}/${current.build.config}"
/>
     <if test="${not(build.skip)}">
-       <property name="current.build.keysign" value="${current.build.config=='release'
and file::exists(snk.file) 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>
+    <call target="dependency-init"/>
   </target>
 
   <!-- ============================================================================================
-->
   <!--    C O N F I G U R A T I O N     T A R G E T S                                
              -->
   <!-- ============================================================================================
-->
 
-  <target name="set-noskip-configuration" description="Disable skiping builds">
+  <target name="set-noskip-configuration" description="Disable skipping builds">
     <property name="project.noskip"         value="true" />
   </target>
 
@@ -264,7 +256,7 @@
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile"
/>
   </target>
 
-  <target name="conditional-compile" depends="init" unless="${build.skip}"
+  <target name="conditional-compile" depends="init" unless="${build.skip or compile.skip}"
       description="Conditionaly compiles all the modules if build framework and type are
supported">
     <call target="compile" />
   </target>
@@ -352,7 +344,6 @@
       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" />
@@ -364,7 +355,6 @@
       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" />
@@ -391,31 +381,20 @@
 
   <target name="install-all" depends="release-init" description="Install all build configurations
for all runtime configurations">
     <echo message="Installing all build configurations for all runtime configurations."
/>
-    <call target="set-debug-configuration" />
-    <call target="set-net-1.1-framework-configuration"  /><call target="conditional-install"
/>
-    <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install"
/>
-    <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install"
/>
-    <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install"
/>
-    <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install"
/>
-
-    <!-- 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.1-framework-configuration"  /><call target="conditional-install"
/>
-      <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install"
/>
-      <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install"
/>
-      <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install"
/>
-      <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install"
/>
-    </if>
+    <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
+      <foreach item="String" in="${build.config.strings}" delim="," property="current.build.config">
+        <call target="install" />
+      </foreach>
+    </foreach>
   </target>
 
-  <target name="conditional-install" depends="init" unless="${build.skip}"
-      description="Conditionaly install all the modules if build framework and type are supported">
-    <call target="install" />
+  <!-- Install the modules to the local repo -->
+  <target name="install" depends="init, conditional-compile" description="Install the
artifacts into the nant repo">
+    <call target="conditional-install" />
   </target>
 
-  <!-- Install the modules to the local repo -->
-  <target name="install" depends="compile" description="Install the artifacts into the
nant repo">
+  <target name="conditional-install" unless="${build.skip}"
+          description="Install the artifacts into the nant repo">
     <property name="path" value="${project.group}/${project.name}/${project.version.full}/${current.build.framework}/${current.build.config}"/>
 
     <foreach item="File" property="install.filename">
@@ -423,8 +402,8 @@
         <items refid="install.filenames" />
       </in>
       <do>
-        <property name="repo.task.artifact" value="${path}/${install.filename}"/>
-        <property name="repo.task.src" value="${build.bin.dir}/${install.filename}"/>
+        <property name="repo.task.artifact" value="${path}/${path::get-file-name(install.filename)}"/>
+        <property name="repo.task.src" value="${install.filename}"/>
         <call target="repo-install"/>
       </do>
     </foreach>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant.build?rev=709071&r1=709070&r2=709071&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant.build Wed Oct 29 18:18:57 2008
@@ -62,6 +62,13 @@
 		<include name="LICENSE.txt"/>
 		<include name="NOTICE.txt"/>
     </fileset>
+
+    <fileset id="install.filenames">
+		<include name="${build.bin.dir}/${project.name}.dll"/>
+		<include name="${build.bin.dir}/${project.name}.?db"/>
+		<include name="${build.bin.dir}/${project.name}.Test.dll"/>
+		<include name="${build.bin.dir}/${project.name}.Test.?db"/>
+    </fileset>
 </target>
 
   <!-- Load the common target definitions  -->

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj?rev=709071&r1=709070&r2=709071&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj Wed Oct 29 18:18:57 2008
@@ -23,6 +23,7 @@
     <SccLocalPath>Svn</SccLocalPath>
     <SccAuxPath>Svn</SccAuxPath>
     <SccProvider>SubversionScc</SccProvider>
+    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -93,4 +94,8 @@
     </Content>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+  <PropertyGroup>
+    <PostBuildEvent>cd $(ProjectDir)
+nant install-all -D:compile.skip=true</PostBuildEvent>
+  </PropertyGroup>
 </Project>
\ No newline at end of file



Mime
View raw message