Downloading, Building and Running UML2MOF Tool

Author:
Martin Matula, NetBeans / Sun Microsystems

History:
Available in the CVS

Downloading

To download the tool, simply go to MDR Downloads Page and click on uml2mof.zip. Read and accept the license agreemets. To be able to run the tool, you will also need to download the mdr-standalone.zip file. After downloading both zip-files, expand them into the same directory. Now you are ready to run the tool.

Building

If instead of downloading you want to build the tool from sources on your own, here are the steps you need to follow to do it:
  1. Build MDR from sources (see MDR Build Instructions - the Most Current Standalone Version)
  2. Build MDR Ant task in mdr/extras/mdrant (see MDR Ant documentation)
  3. Download UML 1.4 metamodel from here and put it into %nb_all%/mdr/xmidiffs directory.
  4. Run ant in mdr/extras/uml2mof directory to build UML2MOF tool.
  5. Congratulations! The UML2MOF Tool is built (in "release" directory). See below for instructions on how to use it.

Usage

Using the tool is very simple. You just run uml2mof.jar from the directory where you expanded the downloaded zip files (or from %nb_all%/mdr/extras/uml2mof/release if you have built the tool from sources) which takes two commandline parameters. The first one is the source file (this has to be an XMI file conforming to UML 1.4 metamodel). The second parameter is a name for the target file (this will be an XMI file conforming to MOF metamodel - result of the UML2MOF transformation). After the tool successfully finishes, you should be able to import the generated file into an instance of MOF metamodel.

Example: The following command reads in a UML XMI file named "umlmodel.xml" and generates a MOF XMI file named "mofmodel.xml" from it:
java -jar uml2mof.jar umlmodel.xml mofmodel.xml