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 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.
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.
Advanced
tab and click on
Environment Variables
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.
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.
C:\Program Files\Apache Software Foundation\Maven 1.0.2
)
home
directory. (If your login is
foo
this means here:
C:\Documents and Settings\foo
)
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
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 |
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 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.)
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.
C:\Program Files\MySQL\mysql-connector-java-3.1.12
.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.
Now that the development environment is set up we are ready to create the TimeTracker application. Click here to get started.