Getting Started

  • Set Up Development Environment

    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.

    1. 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 ( 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.

      1. Go to the control panel and double-click on System or use WinKey + Pause. (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 and that 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_06).

      Java development environment setup is now completed.

    2. Install Maven 2

      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:

      1. Go to the Maven download page . Download the file called maven-2.x.x-bin.zip. At least version 2.0.8
      2. Unzip this file at C:\Program Files\Apache Software Foundation. A directory called maven-2.x.x will be created which contains the Maven program.

      Maven 2 installed.

    3. 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_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
      Environment variables .

      MAVEN_OPTS parameters can be define in mavenrc script or mavenrc_pre.bat.

    4. Maven 2 settings.xml configuration

      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
      settings.xml

      File settings.xml is located in directory M2_HOME/conf

    5. Test Maven 2 and create a local repository

      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.

    6. Install UML tool
    7. Install database if using persistence
    8. Install IDE of Your choice
    9. Create Application

      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
      
    10. Finalize Application

      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 ..