Compilation

Default (Local) Profile

Change into the top-level trunk/ directory. Generate all of the automatically-generated AndroMDA sources:

                mvn install

You should see a "BUILD SUCCESSFUL" message at the end of it. You must be connected to the internet for this step to work, as there will be many jars that need to be downloaded.

You now have all auto-generated code.

Testing (Validation) Profile

This is the same as the Default profile, except you have to explicitly state that you want to compile using the Validation profile. Further, during the initial install, you don't want the unit tests to be run, as you want all jars to be made first.

                mvn -Denv=val -DskipTests install

The Validation profile has now been used to make all FuGE Hibernate STK jars.

Fixing a Bug in the AndroMDA plugin

This step must be run only once, directly after the first time you run the first maven install command. Follow this step and then run the same maven install command you ran the first time to pick up the modified plugin.

When you downloaded and installed the AndroMDA plugin for Maven 2, there was a small bug in one of the jars. (Details of this bug can be found on the AndroMDA forum , and thanks to Olga Tchuvatkina for including the instructions for fixing it.)

Without this fix, the XSDs generated will be virtually empty, containing only the top-level namespace information. Therefore, the first time you run maven install, the AndroMDA plugin files are automatically downloaded, but with the incorrect xmlschema cartridge. This copy step only needs to happen once.

  1. Go into the top-level directory (directly underneath the trunk/ directory) of SyMBA. You'll find a file called andromda-xmlschema-cartridge-3.2.jar there.
  2. Copy this into the correct part of your Maven 2 Repository. Below the environment variable $M2_REPO is used to mark the location of your local Maven 2 Repository. Overwrite the default jar file with the fixed one, making the directory first, if required:
        mkdir -p $M2_REPO/org/andromda/cartridges/andromda-xmlschema-cartridge/3.2/
        cp andromda-xmlschema-cartridge-3.2.jar $M2_REPO/org/andromda/cartridges/andromda-xmlschema-cartridge/3.2/

Optional Modification of the UML

Once you have run the maven install at least once, and fixed the bug in the AndroMDA plugin as stated above, you can start modifying the UML, if you so wish.

OPTIONAL: If you wish to make changes to the FuGE UML prior to generating the code, the UML may be found in trunk/symba-mda/src/main/uml/SyMBA-FuGE-v1.mdzip . Any changes you make in the UML must be converted from this MagicDraw proprietary file type to a standard UML2 file type.

  • Open up MagicDraw 15.0. Before you open any of the FuGE mdzip files, you need to set the maven2.repository path variable. This is equivalent to the $M2_REPO environment variable you will have already set when installing maven. It points to the location of the andromda 3.2 profiles, which are inside the maven repository. This value should be wherever you have your maven repository: if you installed Maven2 using the default repository location, then maven2.repository would be $HOME/.m2/repository for linux, or the equivalent in windows.
  • If you are having problems, you can manually copy all of the andromda profiles from the maven repository ($M2_REPO/org/andromda/profiles ) into the same directory as the model file, or into the profiles/ directory of the MagicDraw installation location.
  • Test that your setup works after setting this variable by opening trunk/symba-mda/src/main/uml/SyMBA-FuGE-v1.mdzip . If it loads without error, you MagicDraw installation is complete.