Install Maven
Maven a tool used for building and deploying applications generated by AndroMDA. 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. Install Maven by following
the steps below:
- Click here to
point your browser to the Maven download page. Download the file calledmaven-2.0.5-bin.zip. - Unzip this file at
C:\Program Files\Apache Software Foundation. A directory
calledmaven-2.0.5will be created which contains the Maven program.
Setting up Maven environment variables
Set M2_HOME, and M2_REPO up like JAVA_HOME
| Property | Value |
|---|---|
| M2_HOME | Maven installation directory, e.g. /home/aabdelaziz/maven-2.0.5 |
| M2_REPO | Maven local repository, e.g. /home/aabdelaziz/.m2/repository |
| MAVEN_OPTS | Parameters to pass to the Java VM when running Maven. Set this value to: -XX:MaxPermSize=128m (required to build large Maven projects) |
| 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 $M2_HOME/bin |
Test Maven and create a local repository
- Open a Command Prompt and change the current directory to any temporary directory,
such asC:\temp. - Execute the following command to make sure you can run Maven:
mvn --version - Maven should display the following output:
Maven version: 2.0.5. - Now execute the following command to create a temporary project:
mvn archetype:create -DgroupId=testapp -DartifactId=testapp
Make sure that you get a
BUILD SUCCESSFULmessage at the end. Sometimes
due to bad Internet connectivity, Maven may not be able to download all dependencies.
If your build fails due to this reason, try to issue the command again until you
get a successful build. - Verify that Maven created a temporary project called
testappin the
current directory and also a local repository at the default location mentioned
above. If both these results are achieved successfully, you can delete the temporary
project that was just created.
Install AndroMDA Application plugin
Next we will download and install the AndroMDA Application plugin into your Maven
repository. 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. Install the plugin by following the steps below.
- Click
here to download the the AndroMDA plugin installer. - Unzip the contents of the installer into your Maven repository at
/home/aabdelaziz/your user name/.m2/repository. - Verify that the following directory was created:
C:\Documents and Settings\your user name\.m2\repository\org\andromda\maven\plugins\andromda-maven-plugin - Create a temporary directory, e.g.
C:\andromda-temp. - Create a file called
pom.xmlin this directory with the following content.
<project> <modelVersion>4.0.0</modelVersion> <groupId>samples.test</groupId> <artifactId>test</artifactId> <version>1.0</version> <packaging>jar</packaging> <name>test</name> <build> <defaultGoal>compile</defaultGoal> <plugins> <plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromdapp-maven-plugin</artifactId> <version>3.2</version> </plugin> </plugins> </build> <repositories> <repository> <id>andromda</id> <name>AndroMDA Repository</name> <url>http://team.andromda.org/maven2</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>andromda</id> <name>AndroMDA Repository</name> <url>http://team.andromda.org/maven2</url> </pluginRepository> </pluginRepositories> </project> - Open a Command Prompt in the directory where you created this
pom.xmland run the command
mvnwithout any arguments. Make sure the command
completes successfully by displaying theBUILD SUCCESSFULmessage. - You can now delete the temporary directory you created in step 1.
Create settings.xml with the following content then place it under ~/.m2/
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers>
</servers>
<localRepository>/home/aabdelaziz/.m2</localRepository>
<mirrors>
<mirror>
<id>ggi-project.org</id>
<url>http://ftp.ggi-project.org/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>planetmirror.com</id>
<url>http://downloads.planetmirror.com/pub/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>lsu.edu</id>
<url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 1. ANDROMDA -->
<mirror>
<id>andromda.org</id>
<url>http://team.andromda.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 2. IBIBLIO -->
<mirror>
<id>ibiblio.net</id>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
If some jars didn't installed (downloaded) try swapping the order of ANDROMDA, and IBILIO repositories

Recent comments
3 days 22 hours ago
1 week 5 days ago
2 weeks 4 hours ago
2 weeks 2 days ago
2 weeks 3 days ago
3 weeks 16 hours ago
3 weeks 16 hours ago
4 weeks 5 days ago
9 weeks 3 days ago
9 weeks 3 days ago