Frequently Asked Questions

Using AndroMDA

  1. How can I know what namespace properties I can set ?
  2. My company likes our DBA to design our database schemas, is there any way that I can generate a model from an existing schema?
  3. Will moving to AndroMDA 3.X mean I need to switch from Ant to Maven?
  4. What JDK can I use with AndroMDA? Can I use JDK 1.4/1.5?
  5. I haven't used this product in the past, but I'm curious: will it stay in sync with code modifications? Let's say I do a model in Rose, bring it into AndroMDA, and generate code from it. Then I modify the generated code by hand. Will the UML model be updated automatically ?
  6. Will my custom code be overwritten the next time I (re)generate ?
  7. I have a large model and it takes a while for AndroMDA to process everything, is there anyway to speed things (i.e. selecting only certain cartridges to run against my model)?
  8. I would like to tune the way AndroMDA is logging differently in a production environment than in a development environment. Can specify a custom logging configuration ?

Development

  1. How do I build AndroMDA?
  2. How can I develop a Cartridge?
  3. How can I develop a Translation-Library?

Third-party tools

  1. How do I import the andromda profile ?
  2. I tried using MagicDraw with Andromda v2.1.2 by trying with the model-report cartridge that comes with andromda. I am unable to get passed opening the file in the ant task, I am getting an error. This happens in both in XMI1.1 and 1.2 format which Magicdraw 7.5 support. What can I do to solve this problem ?
  3. What UML tools can I use in combination with AndroMDA ?

Using AndroMDA

How can I know what namespace properties I can set ?

We distinguish two types of namespace properties, first of all we have the properties that have been defined on the generic metafacade level, this is the metamodel that will always be used no matter what cartridges we are using. Secondly we have the cartride namespace properties, there is a set of properties defined on the level of the cartridge. All cartridges have namespace properties, for example to specify where to output a certain family of files. An example would be the 'enumerations' property in the Java Cartridge.

  • Metafacade properties: The properties you can always use, regardless of any cartridges.
  • Cartridge properties: Since each cartridge defines its own set of properties (although some properties have the same for convenience) this link points to the 'Cartridges' page, select a cartridge and click on 'Namespace' to see its namespace properties.

[top]


My company likes our DBA to design our database schemas, is there any way that I can generate a model from an existing schema?

Yes there's a AndroMDA utility called Schema2XMI that will do exactly that.

[top]


Will moving to AndroMDA 3.X mean I need to switch from Ant to Maven?

While Maven is the build/project tool utilized by AndroMDA, you can still just as easily use an AndroMDA project with Ant. In fact we have an Ant tool that will generate an Ant AndroMDA project structure for you. Please see the Ant section of the getting started page for more details.

[top]


What JDK can I use with AndroMDA? Can I use JDK 1.4/1.5?

AndroMDA will only run correctly with JDK 1.6 or above.

[top]


I haven't used this product in the past, but I'm curious: will it stay in sync with code modifications? Let's say I do a model in Rose, bring it into AndroMDA, and generate code from it. Then I modify the generated code by hand. Will the UML model be updated automatically ?

Changes in the code will not be reflected back into the UML model, so the answer is no. The generation is unidirectional from UML to <code>.

[top]


Will my custom code be overwritten the next time I (re)generate ?

Incremental development and regeneration cycles are supported by AndroMDA

For classes this is not a problem, abstract parent classes are regenerated, the child classes are only generated when they do not yet exist, so you will put your custom code in there and you are sure it will stay there, worst case you'll have compilation errors when building your project

Jsps, properties files, etc... are a different story because the notion of extending one another does not exist. Tackling this problem is not so easy as with classes. Anyway, it is partially supported. For the Bpm4Struts cartridge JSPs will be using Tiles to separate as much as possible those parts that need update and those that don't need update. The cartridge also generates CSS stylesheets, i18n properties files, etc.. subsequently making it easier to identify which files would need manual update

what most users will do anyway is fine-tune the templates to their needs, they are quite easy to read and are written in Velocity (any other template-engine can easily be supported), and in doing so the generated files will be customized to your very needs.

The purpose of AndroMDA is not to generate your complete application with the click of a button, maybe that will be possible in the future :-) but not yet for now. If you are tired of writing the same code all the time, updating XDoclet tags, etc... and you want to keep focus on the business, AndroMDA is for you.

For users not familiar with AndroMDA, here's an approximation of the percentage of code generated:

  • Persistence (EJB/Hibernate): 100%
  • Business (EJB): 30%
  • WebServices (Axis): 100%
  • Presentation (Struts): 80%

The presentation layer is taken care of. The business layer needs an implementation since this is (or at least should be) unique for each different application. The presentation will also run out-of-the-box but you'll still need to wire it to the business layer. The web application can be deployed and run without it though, be it with a 'dummy' implementation behind.

Since each layer is cleanly separated each one of them can be developed and tested independently before linking them together.

[top]


I have a large model and it takes a while for AndroMDA to process everything, is there anyway to speed things (i.e. selecting only certain cartridges to run against my model)?

Yes, you can filter the cartridges you want to run against your model by using the maven.andromda.cartridgeFilter property (when using the AndroMDA Maven Plugin) or the cartridgeFilter attribute (when using the AndroMDA Ant task).

[top]


I would like to tune the way AndroMDA is logging differently in a production environment than in a development environment. Can specify a custom logging configuration ?

Yes, both Maven as well as Ant have a property enabling you to point to a log4j XML configuration file. The default configuration file used can be found in the andromda-core-XXX.jar artifact. Open this jar file and go into the /org/andromda/core/common directory, you will see the log4j.xml file there. Copy it to an external location, edit it and point to it using the property.

Maven users specify maven.andromda.loggingConfigurationUri in their project.properties file, Ant users use the loggingConfigurationUri property in their build.xml. The location of the log4j.xmlfile must be preceeded by the file: prefix. Here's an example:

maven.andromda.loggingConfigurationUri=file:${logging.cfg.dir}/my-log4j.xml

[top]

Third-party tools

How do I import the andromda profile ?

Since the andromda profile contains all the datatypes, tagged values and stereotypes that are known to work with AndroMDA and the cartridges it's pretty important you are able to properly achieve the import into your own project. It depends on what tool you are using, two are listed here.

You can find the AndroMDA UML Profile in the distribution, if you're using Maven and you it has already downloaded the AndroMDA dependencies you should be able to find the profile here: ${user.home}/.maven/repository/andromda/xml.zips/

[top]


I tried using MagicDraw with Andromda v2.1.2 by trying with the model-report cartridge that comes with andromda. I am unable to get passed opening the file in the ant task, I am getting an error. This happens in both in XMI1.1 and 1.2 format which Magicdraw 7.5 support. What can I do to solve this problem ?

Your model contains a reference to a module called "UML Standard Profile". AndroMDA 2.1.2 is not able to resolve such a reference. AndroMDA 3.0 contains code to resolve such references.

You have three options:

  1. Make the profile part of your model.
  2. Remove the profile entirely from your model.
  3. Use AndroMDA 3.0.

Option 1 will make your model larger. Option 2 will make it smaller but you will lose all standard UML stereotypes, datatypes and tagged value definitions. Option 3 makes your life a little less certain although the new software already works quite well. :-)

See also the MagicDraw 7.5 manual for details, especially the chapter about "Module management".

[top]


What UML tools can I use in combination with AndroMDA ?

Two tools are known to work well with AndroMDA: MagicDraw and Poseidon. For a more comprehensive list of tools that have been tested, go here: UML tools.

[top]