MDR Installation Instructions

Contents:
1. Installation of MDR Binaries
2. Building and Installing MDR from Sources
Important: These instructions are applicable only for builds of NetBeans older than 4.0. Starting from NetBeans 4.0 the MDR is part of the release, thus it does not need to be installed manually. Unfortunatelly, MDR Explorer module does not work for versions 4.0 and higher.

1. Installation of MDR Binaries

Installation of MDR is very simple. Just run NetBeans and install the MDR modules using Autoupdate from NetBeans Update Center Alpha.
In case you are using one of NetBeans release builds (e.g. 3.4 release, or 3.4 beta1, etc.), the Autoupdate will offer you the most recent version of MDR that works with a given release. In NetBeans 3.6 the Update Center Alpha is not on the list of update centers by default. You will have to do the following to add it:
  1. In the main menu select Tools->Options.
  2. Expand IDE Configuration->System->Autoupdate Types nodes in the Options dialog that will appear.
  3. Right-click on the Autoupdate Types node and choose New->General Update Center from the pop-up menu.
  4. In the wizard set the name of the new update center to "NetBeans Update Center Alpha"
  5. Click on the node representing the new update center and set its "Server URL" property to "http://www.netbeans.org/updates/alpha/36_{$netbeans.autoupdate.version}_{$netbeans.autoupdate.regnum}.xml?{$netbeans.hash.code}". Please make sure you press Enter key after copy-pasting the url, since if the property editor looses focus before Enter is hit, the old property value (with the default url) is restored.

Here are more detailed instructions on how to download MDR modules using Update Center:

  1. In the NetBeans main menu go to Tools->Update Center - the Update Center Wizard will appear.
  2. Make sure that NetBeans Update Center Alpha is checked in the wizard and the Proxy Configuration points to a correct proxy server if you have any (see help associated with the wizard for more information on the Proxy Configuration).
  3. Proceed to the next wizard screen. A list of modules available on the update centers you selected on the first wizard screen will appear. Scroll to the NetBeans Update Center Alpha. You should see MDR modules group under this update center containing set of MDR related modules. (Note: It is possible that there will be two MDR module groups displayed under the Alpha Update Center in NetBeans dev build. In that case, please use the MDR group containing the most recent modules.)
  4. Select the modules you wish to install (all the dependent modules will be added to the download list automatically). Most useful modules are MDR Explorer (for NetBeans 3.4 and higher) and MDR Toolkit (for NetBeans 3.3.x).
  5. While proceeding to the next screen, a license will be displayed. You need to accept this license in order to be able to download the selected modules.
  6. After downloading the modules, press the Finish button of the wizard and confirm to restart the IDE.

Now you are ready to play with MDR. See First Steps with MDR to learn how to start.

You should periodically check the update center for availability of newer versions of MDR modules.

2. Building and Installing MDR from Sources

These instructions are useful for the people who want to make their own builds of MDR (e.g. because of their needs for making slight changes to the MDR source code). It requires users to check out NetBeans source code and build NetBeans. This is because the MDR build script is prepared for being integrated into the NetBeans automated builds and thus it depends on some NetBeans infrastructure. Advanced users should be able to figure out form the build script source code, how to build the MDR sources without having whole NetBeans sources checked out.

There are currently two different versions of MDR useful for the end users.

NetBeans 3.6 (and older) Compatible Version

The first version is the one available on NetBeans alpha update center. It contains the MDR explorer application which is useful when running MDR from NetBeans.

Following are the instructions on how to build this version of MDR:

  1. Check out NetBeans sources (module "standard_nowww") with buildsys_trunk_before_merge tag from the CVS (see the NetBeans CVS Access page for more details) into a clean directory (in the further text this directory will be referenced as %nb_all% )
  2. Update %nb_all%/nbbuild/cluster.properties from "mdr_nobuildsys" branch.
  3. Do NetBeans "slim" build by running "ant -Dmoduleconfig=slim build" in %nb_all%/nbbuild directory (see NetBeans Quick Start with Ant for more information on how to do that).
  4. Check out "mdr" module from the "mdr_nobuildsys" branch of the CVS to the same folder as the rest of the NetBeans sources.
  5. Build Naming and Looks modules. Naming module build file is located in the %nb_all%/core/naming directory and Looks module is located in %nb_all%/openidex/looks. To build this modules, go to their home directories and run ant.
  6. Build MDR using ant (go to %nb_all%/mdr folder and run ant or start NetBeans, mount %nb_all%/mdr as a filesystem and start build.xml build script).
  7. Run NetBeans from %nb_all%/nbbuild/netbeans/bin.
This may be achieved for example by this sequence of commands on the commandline:
  1. cd %nb_all% (switch to the %nb_all% directory - whatever directory you pick where you want to checkout the sources)
  2. cvs checkout -r buildsys_trunk_before_merge standard_nowww (exactly corresponds to the step 1 in the build instructions above)
  3. cvs update -r mdr_nobuildsys nbbuild\cluster.properties (step 2 in build instructions)
  4. cd nbbuild (switch to the nbbuild directory)
  5. ant -Dmoduleconfig=slim build (step 3 in build instructions)
  6. cd .. (switch back to %nb_all%)
  7. cvs checkout -r mdr_nobuildsys mdr (step 4)
  8. cd core/naming (switch to naming module directory)
  9. ant (build naming module - first part of step 5)
  10. cd ../../openidex/looks (switch to looks module directory)
  11. ant (build looks module - second part of step 5)
  12. cd ../../mdr (switch to mdr directory)
  13. ant (step 6)
  14. cd ../nbbuild/netbeans/bin (switch to netbeans/bin directory)
  15. ./runide.sh (linux) or runide (windows) (run netbeans)

The Most Current Standalone Version

The most current version of MDR integrated with the new NetBeans build system can be built from the CVS main trunk according to the build instructions bellow. This version is also available from the daily updated mdr-standalone.zip. It does not contain MDR explorer (since the looks API that it used was removed from the main trunk together with many other changes for NetBeans 4.0) and thus is useful mostly for those who are interested in a standalone MDR library rather than for those who want to play with MDR in NetBeans.
  1. Check out NetBeans sources (module "standard_nowww") from the CVS main trunk (see the NetBeans CVS Access page for more details) into a clean directory (in the further text this directory will be referenced as %nb_all% )
  2. Check out "mdr" and "apisupport" modules from the CVS main trunk to the same folder as the rest of the NetBeans sources.
  3. Build MDR and all modules it depends on by running "ant all-mdr" in %nb_all%/nbbuild directory.
  4. Build mdr-standalone.zip by running "ant download" in %nb_all%/mdr directory. You will get the zip that contains all the jars necessary to use MDR as a standalone library.
Following is an example of commandline commands that will do what the build instructions suggest:
  1. cd %nb_all% (switch to the %nb_all% directory - whatever directory you pick where you want to checkout the sources)
  2. cvs checkout standard_nowww apisupport_nowww mdr_nowww (checkout compact version (i.e. without www folder) of NB sources and apisupport and mdr modules - steps 1 and 2 in build instructions)
  3. cd nbbuild (switch to nbbuild directory)
  4. ant all-mdr (step 3)
  5. cd ../mdr (switch to mdr directory)
  6. ant download (step 4)