Prepare the Development Environment

To start developing with AndroMDA prepare your development environment by following the steps shown below. We assume that you are working on a Windows platform.

Install Java

Install J2SE Development Kit 5.0 (JDK 5.0) from here . This is the preferred version of the JDK for AndroMDA. We also support JDK version 1.4. If you prefer this version, you can download it from here .

Make sure that the JAVA_HOME environment variable is pointing to the directory where you installed the JDK. It is possible you have this variable set already, but just to make sure here's how to check.

  1. Go to the control panel and double-click on System. If you are a Windows XP user it's possible you have to open Performance and Maintenance before you will see the System icon.
  2. Go to the Advanced tab and click on Environment Variables
  3. Make sure you have set the JAVA_HOME variable set and it is pointing to the directory where you installed the JDK. If not, add/edit the variable and set it to the correct value, e.g. C:\Program Files\Java\jdk1.5.0. You may add the variable to the list of user variables or system variables.

Install Maven

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. We will now install Maven and configure it to download dependencies from the AndroMDA server whenever it needs to.

  1. Download Maven 1.0.2 from this site: http://maven.apache.org/start/download.html . Note that later versions of Maven are not yet supported by AndroMDA.
  2. Install the downloaded binary. (We will assume you installed it in C:\Program Files\Apache Software Foundation\Maven 1.0.2)
  3. If the installation would complain that the JAVA_HOME environment is not set then make sure you have correctly set it and close Windows Explorer or Total Commander , whatever it is you are using and start it again.
  4. Go to your home directory. (If your login is foo this means here: C:\Documents and Settings\foo)
  5. Create a file there, called build.properties and add the following line in there. This line instructs Maven to look for artifacts at the AndroMDA site in addition to the ibiblio site.

    maven.repo.remote=http://www.ibiblio.org/maven,http://team.andromda.org/maven

Setup environment variables

We have seen earlier how to set environment variables such as JAVA_HOME, it is strongly recommended to set the following variables before continuing. We repeat JAVA_HOME here just for completeness.

Property Value Required?
JAVA_HOME Java installation directory, e.g. C:\Program Files\Java/jdk1.5.0 Yes
MAVEN_HOME Maven installation directory, e.g. C:\Program Files\Apache Software Foundation\Maven 1.0.2 (this may have already been set by the Maven installer) Yes
MAVEN_OPTS Parameters to pass to the Java VM when running Maven. Set this value to: -XX:MaxPermSize=128m -Xmx512m (required to build large maven projects such as AndroMDA itself) No
PATH This makes sure the system will search for console commands in the directories listed here. If this property already exists you should simply add %JAVA_HOME%\bin;%MAVEN_HOME%\bin Yes

Install AndroMDA Application plugin

Next we will download and install the AndroMDA Application plugin to the MAVEN_HOME/plugins directory. This plugin allows creation of Java starter applications that use AndroMDA. This is the only AndroMDA artifact that we will install explicitly. All other artifacts, such as AndroMDA cartridges, will be automatically downloaded by the Maven scripts generated by the plugin.

To install the Application plugin open a Command Prompt and Execute the following command. Make sure you get a "BUILD SUCCESSFUL" message at the end of the command output.

maven plugin:download -DgroupId=andromda -DartifactId=maven-andromdapp-plugin -Dversion=3.3

Notice that you will now have maven-andromdapp-plugin-3.3.jar installed at MAVEN_HOME/plugins (C:\Program Files\Apache Software Foundation\Maven 1.0.2\plugins for this example).

Install a UML tool

Install a tool that will allow you to model your applications in UML and export these models into a format that AndroMDA can understand. AndroMDA currently supports UML 1.4 and XMI 1.2. Please follow one of the links below to install the UML tool of your choice. (We invite UML tool vendors and open-source projects to test their tools with AndroMDA and supply installation instructions for inclusion in this section.)

ArgoUML 0.20 MagicDraw 9.5

Install a database

Install a database that is supported by Hibernate. Click here to see the list of supported databases. For the purpose of this tutorial we will assume that you have installed one of the following databases. If you have installed another database then you will have to change the Hibernate configuration accordingly.

  • MySQL 5.0: MySQL is an open source database. You can download it from here . We recommend downloading the full Windows installation - not just the "Essentials". In addition, download and install MySQL Administrator as well as MySQL Query Browser . These are GUI based tools that will make your development much easier. Finally, download and unzip MySQL Connector/J (the MySQL JDBC driver) in a convenient directory. For the purpose of this tutorial we will assume that you have installed the driver at C:\Program Files\MySQL\mysql-connector-java-3.1.12.
  • PostgreSQL 8.1: PostgreSQL is an open source database. You can download it from here . The Postgres installation contains a GUI based administrative tool called pgAdmin III. JDBC drivers are also included as part of the installation.
  • Oracle 9i: Oracle 9i is an commercial database sold by Oracle . We assume that you have the necessary distribution media to install it. Oracle 9i includes a GUI based administrative tool called Enterprise Manager. JDBC drivers are also included as part of the installation.

Install Eclipse (Optional)

Eclipse is a popular open source IDE that is useful in developing Java applications. AndroMDA does not require the use of Eclipse. However we do recommend using it for development as it helps increase your productivity. You can download Eclipse from here . Double-click the downloaded file to start the installation.

What's Next?

Now that the development environment is set up we are ready to create the TimeTracker application. Click here to get started.