This article shows you how to write an AndroMDA cartridge in 10 distinct steps, using a sample cartridge which generates an Ant-like build script from a UML deployment model. This is why the tutorial cartridge is called "andromda-deployment".
Hint: PSM means "platform specific model".
First of all, analyze the target technology for which you want to generate the code. Ask yourself some questions:
What are the core concepts in my target technology?
What are the formats in which the target technology expresses itself?
The answers to these questions are the results of target technology analysis. The results are twofold:
In the case of our deployment cartridge, the platform that we describe in our PSM is the Ant platform. So, the PSM core concepts are:
The file format involved is a simple XML format that can contain projects, targets and tasks. I am lazy in this tutorial, so I will not generate fully functional Ant scripts but only something conceptually similar so that you can see the intention.