Building NMSCurrently our main build tool for NMS is NAnt.
Building NMS with NantYou will need nant-0.91 or higher. The version 0.90 won't work. To build the code with Nant you will need to build the individual modules, starting with the main NMS module first. Following are the steps needed to build all of the modules, but depending on which provider you are using, you may only need to build the main Apache.NMS module and then your specific provider module. For example, if you are only working with ActiveMQ, then you would need to build the Apache.NMS module and the Apache.NMS.ActiveMQ provider module. Here are the steps to build all of the modules for the trunk version. Modify the paths to build a particular tag release (e.g., change the trunk folder to tags\1.0.0): cd activemq-dotnetcd Apache.NMS\trunk nant cd ..\..\Apache.NMS.ActiveMQ\trunk nant cd ..\..\Apache.NMS.MSMQ\trunk nant cd ..\..\Apache.NMS.EMS\trunk nant cd ..\..\Apache.NMS.WCF\trunk nant This will build all of the providers. The only module that needs to be built first is the Apache.NMS module, as all of the other provider modules depend upon that module. IMPORTANT: In order to build the Apache.NMS.EMS module, you must have a licensed copy of the TIBCO.EMS.dll. This module is not available from The Apache Software Foundation.
If you want to run a build with the unit tests (assuming you have a broker running) then type the following from the trunk folder of the provider module: nant test Alternatively, you can use the NUnit graphical interface to load the appropriate module's nunit project file. Each project includes a file named Apache.NMS.modulename.Test.nunit, where modulename matches the provider module's name (e.g., ActiveMQ, EMS, MSMQ or WCF). This file can be loaded into the NUnit's graphical application to run all of the unit tests and see their output. Building NMS using Maven 2 is not directly supportedMaven 2 support is incomplete. Ultimately we'd prefer to use Maven to build NMS, as then we'd have a single tool for creating distros & doing builds etc. You can use the Maven C# plugin to build the code if you have Maven 2.0.2 or later installed. First you need to tell maven the location of the .NET environment and where to get the Maven C# Plugins. To do that you need to edit your ~/.m2/settings.xml so that it looks like the following. This file works on OS X - for other platforms use the correct value of dotnet.home for where Mono/.Net is on your machine.
<settings>
<profiles>
<profile>
<id>default</id>
<properties>
<dotnet.home>/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/1.0</dotnet.home>
</properties>
<repositories>
<repository>
<id>maven-csharp</id>
<name>maven-csharp</name>
<url>http://maven-csharp.javaforge.com/repo</url>
</repository>
<repository>
<id>codehaus-snapshot</id>
<name>CodeHaus Snapshot Repo</name>
<url>http://snapshots.maven.codehaus.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-csharp-plugins</id>
<name>maven-csharp</name>
<url>http://maven-csharp.javaforge.com/repo</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
<pluginGroups>
<pluginGroup>com.javaforge.maven-csharp</pluginGroup>
</pluginGroups>
</settings>
Once that's done you only need to: cd activemq-dotnet mvn install IDE TipsIf you are on windows then you probably want to use Visual Studio 2008; we highly recommend using ReSharper as well, - its a shame there is not a distro for OS X and Linux Using MonoDevelop to edit C#If you are on OS X or Linux (and even Windows nowdays) we recommend the use of MonoDevelop for editing, refactoring and running the code. MonoDevelop can load the NMS Visual Studio Project files, and is integrated with the Mono debugger as well. Using Eclipse to edit C#You can use Eclipse as your IDE to edit C# code. If you want to use Eclipse there are the following two C# eclipse plugins we are aware of We tend to use BlackSun as it has auto-format and outline view support along with compiler warnings (though you might want to change the default font size). |