Skip to content.
Table of Contents


MBAT 3.0 Build Instructions

If you are using Eclipse then all the configuration and build scripts should automatically compile, archive the plugins, and copy them to the appropriate locations. However, after initially importing or making clean, some of the build.xml may not work correctly due to project dependencies. Hence, it is recommended you follow the manual instructions below after an update or make clean.

Instructions to manually build and configure the entire source repository are given below.

Eclipse Builders

By default, many of the MBAT Eclipse projects are configured to automatically run the Ant build.xml during an auto-build. To disable this feature:

  1. Right-click on the Project -> Properties. Select "Builders" in the left panel tree view. Unselect the build.xml builder from the Builder list.

To build the projects, you must the manually run the Ant build.xml scripts as described below.

MBAT 3.0 Plugin Directory Structure

If you are using another IDE, then make sure the plugins are copied to the plugins folder with the following directory structure:

     plugins/
         mbRegistration/
         mbSearch/
         workspaces/
Also, when running the executable, make sure the working directory is at the same directory level as the plugins folder. For example, in the Eclipse configuration, the plugins are located in mbat/dist/plugins and the working directory is mbat/dist.

MBAT 3.0 build.xml scripts

In order to build and run mbat3.0, the workspaces and their plugins must be built in the following order due to dependencies. The included build.xml files automatically copy the files to the listed pre-defined locations. To run the ant build, navigate to the build.xml file in the src folder, right-click, choose "Run As"->"Ant Build...". Once you run it once it will be added to the list in the "Run As" shortcut in the toolbar.

  1. mbRegistration
    1. run mbRegistration build.xml (copies mbRegistration.jar to mbWorkspacePlugins\plugins\net.nbirn.mbat.plugins.workspace.Registration\src\lib)
    2. run mbRegistrationPlugins build.xml (copies plugins to mbat/dist/plugins/mbRegistration)
  2. mbSearch
    1. run mbSearch build.xml (copies mbSearch.jar to mbWorkspacePlugins\plugins\net.nbirn.mbat.plugins.workspace.Search\src\lib)
    2. run mbSearchPlugins build.xml (copies plugins to mbat/dist/plugins/mbSearch)
  3. mbViewer
    1. run mbViewer build.xml (copies mbViewer.jar to mbWorkspacePlugins\plugins\net.nbirn.mbat.plugins.workspace.Viewer\src\lib)
  4. mbWorkspacePlugins
    1. For Eclipse, refresh (F5) mbWorkspacePlugins project (reloads the any required jar libraries in src\lib\ )
    2. run mbWorkspacePlugins build.xml (copies plugins to mbat/dist/workspaces)

General build dependency rules:

  1. If you update a tool plugin (ie: a registration method), then you need to run the build.xml for that module (ie: mbRegistration).
  2. If you update a workspace plugin (ie: mbSearch), then you have to run the build.xml for that module (mbSearch) and the workspace plugins (mbWorkspacePlugins).


Running MBAT 3.0

The main() function is located in:
  • project: mbat
  • source folder: src/mbat_src
  • package: net.nbirn.mbat.applicationNEW
  • class: mbMain.java

To run:

  1. Navigate to mbMain.java, right-click, choose "Run As"->"Java Application"
  2. If the application fails to find the plugin folder, configure the run working directory


Running workspace clients for testing

Each workspace contains standalone clients for testing and debugging. The Main.java class is found under the net.nbirn.mbat.*.client package for that workspace (ie: net.nbirn.mbat.registration.client.Main).

To run:

  1. Navigate to the Main.java class for the workspace, right-click, choose "Run As"->"Java Application"
  2. If the application fails to find the plugin folder, configure the run working directory


Debugging JPF plugins

Instructions to setup Eclipse for debugging can be found here: http://jpf.sourceforge.net/ide-eclipse.html