This section provides a step-by-step guide to set up your development environment for jIvalo framework. 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 ( for jIvalo version less than 1.5). If you prefer this version, you can download it from here. However, note that this tutorial uses JDK 1.5 features and you will have to make modifications to the instructions to work around them.
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.
Java development environment setup is now completed.
Maven is our preferred tool 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:
Maven 2 installed.
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_13 | yes |
M2_HOME | Maven installation directory, e.g. C:\Program Files\Apache Software Foundation\maven-2.0.8 | 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) |
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;%M2_HOME%\bin |
yes |
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;%M2_HOME%\bin |
yes |
MAVEN_OPTS parameters can be define in mavenrc script or mavenrc_pre.bat.
Configure Maven 2 settings.xml file with following properties in some profile.
Property | Value | Required? |
JAVA_1_4_2_HOME | Java installation directory, e.g. C:\j2sdk1.4.2_16, used with jivalo versions less than 1.5 | yes |
JAVA_5_HOME | Java installation directory, e.g. C:\PROGRA~1\Java\jdk1.5.0_13 used with jivalo versions above 1.1. Windows users note use short names for non-8dot file names (use command DIR /X). |
yes |
jwsdp.home | If webservices generation is used then the Sun Java Webservice Developer Pack home must be defined e.g C:\Sun\jwsdp-2.0 |
no |
was.home | If IBM WebSphere application 6.0 server artifact generation and EJB jar build is used then WebSphere home must be defined e.g C:\WAS60 |
no |
File settings.xml is located in directory M2_HOME/conf
Open command prompt and execute command:
mvn -version Should result: Maven version: 2.x.x
Note that so far we have installed only the Maven application, we have not created a local repository.
If -Dversion parameter is omitted then default is 1.0-SNAPSHOT.
For uml2 (for example MagicDraw 12.5)
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=uml2 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For emf-uml2 (for example Eclipse or IBM RSM/RSA 6)
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=emf-uml2 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
Make sure that you get a BUILD SUCCESSFUL message 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 project called application name in the current directory and also a local repository at the location: C:\Documents and Settings\ your user name \.m2\repository . If both these results are achieved successfully,
For EJB 2.1
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=ejb-2.1 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For J2EE 1.4 EAR
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=j2ee-1.4-ear \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For XML Schemas
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=schema \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For WebServices ( this requires also schema archetype)
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=webservice \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For Geronimo 1.1
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=geronimo-1.1 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For Geronimo 2
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=geronimo-2 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
For WebSphere 6.0
mvn archetype:create -DarchetypeGroupId=net.sourceforge.jivalo.fw.archetype \ -DarchetypeArtifactId=websphere-6.0 \ -DgroupId=<<package>> \ -DartifactId=<<application name>> \ -Dversion=0.1-SNAPSHOT \ -DremoteRepositories=http://jivalo.sourceforge.net/maven2repository
Finalize Application by first changing to previously created directory and then executing jivalo goal:
mvn archetype-finalizer:jivalo
This finalizes projects.
You are ready to proceed Modeling document ..