Install guide for DecisionDeck developing

In the following description, we start from a basic configuration, without any specific software. We won't get into the details of each installation process, since the relevant web sites provide enough information. However, the installation processes are quite obvious, either running a installer or unzipping a file.

In the sequel, we will focus on Windows environment, although it should be mainly applicable to other development platforms. We note %PF%, the program files directory (e.g., C:\Program Files) and %UF%, the user files directory (e.g., C:\Documents and Settings\User Name).

Install the development tools

For these points, you need administrative rights on your computer!

  1. Install a Java Development Kit, from Java download site.
  2. Install a Integrated Development Environment (recommended), from Eclipse download site.
  3. Install a MySQL server, from EasyPHP web site.
  4. Install a software project management tool, from Maven web site.

To finalize this installation step,

  1. Run EasyPhp servers as services, see Configuration Menu in EasyPHP.
  2. Set system environment variables (WinKey + Pause, Advanced, Environment Variables, System Variables):
    1. Add JAVA_HOME and set it to the installation directory of the JDK, e.g %PF%\Java\jdk1.6.0
    2. To PATH, append the bin directory of Maven and of MySQL, e.g. %PF\maven-2.0.5\bin; %PF%\EasyPhp1-8\mysql\bin
  3. Add an Eclipse plugin dedicated to D2 development. The plugin is available through the standard Eclipse update mechanism. Add a new update site pointing to http://decision-deck.sourceforge.net/tools/
    1. Open Eclipse update manager: Help -> Software Updates -> Find and Install... -> Search for new features to install
    2. Click "Add Remote Site..." and create a site such as:
      • Name: Decision Deck Update
      • URL: http://decision-deck.sourceforge.net/tools/
    3. Click Finish and select all items, click next. Although is not signed, you can install it without any trouble. Restart the platform when asked.

From now on, you don't need anymore administrative rights.

Create an account on Sourceforge.net to gain full access to CVS

If you don't need full access, you may skip this point. You will later user anonymous access.

Get the source code from CVS

Run Eclipse. When asked, give a workspace directory, e.g. %UF%\workspace\d2. Then, in the File menu, select Import and specify the following parameters:

Import source
Projects from CVS
Host
decision-deck.cvs.sourceforge.net
Repository path
/cvsroot/decision-deck
User and password
obtained from sourceforge.net (anonymous is also possible, but in read-only access)
Connection type
extssh (or pserver if you choose an anonymous access)

Use default port

Use existing module
select everything under d2 and plugins headers

And then click on finish!

Assemble with Maven

In the command line shell, go the main directory of D2: %UF%\workspace\d2\d2-root And run the following batch file build_exploded.bat

It will compile the full set of DecisionDeck. During this process, Maven will probably download several libraries. Therefore, it may take several minutes.

If everything runs in order, DecisionDeck will be assembled in the following directory: %UF%\workspace\d2-launcher\target\decisiondeck-1.0.2-bin\decisiondeck-1.0.2\bin

Build the sample data bases

A small batch file allows building sample data bases. You will find it in %UF%\workspace\d2-launcher\target\decisiondeck-1.0.2-bin\decisiondeck-1.0.2\bin

Run the install.bat file as follows: install.bat 127.0.0.1 root The required password is probably the default one in MySQL, i.e. an empty one.

First run of DecisionDeck

Now, in the same directory, you should be able to run d2.bat

Congratulations !!!

Configure Eclipse for DecisionDeck

  1. Configure Eclipse Workspace Options in Window->Preferences
    1. Java->Compiler : Compiler compliance level, choose at least 5.0
    2. Java->Build Path->Classpath Variables : add a variable variable to a folder: M2_REPO = %UF%\.m2\repository
  2. Right click on the d2-plugin-descriptor package, and select refresh...
  3. Run the application, run->run..., choose Java application->DecisionDeck; and then Run.

Add an Eclipse plug-in to simplify the development steps

The following steps are not needed, if you already added the Eclipse plugin dedicated to D2 development, through Eclipse update mechanism (see above).

  1. From the CVS, import tools/eclipse/org.decisiondeck.tools.starterkit
  2. Right click on the package org.decisiondeck.tools.starterkit, and select Export. Then, select Plug-in Development->Deployable plug-ins and fragments, and finally select a directory as %UF%\workspace.
  3. Log in as administrator of your computer and copy the JAR file you just built, i.e. org.decisiondeck.tools.starterkit_1.0.0.jar in the Eclipse plugin directory, e.g. %PF%\eclipse\plugins
  4. Log in as plain user and run Eclipse.

Create a "Hello World!" plug-in with both Eclipse and Maven

  1. In the File menu, select New Project. Then, select DecisionDeck Plugin. Give a short name, e.g. mytest, select Require base plugin and Contribute to UI. Then click on Finish.
  2. If you want to incorporate this plug-in in the Maven assembly, then
    1. Add assembly lines in d2-root\build_plugins.bat for your new plug-in
    2. Add dependency lines in d2-launcher\pom.xml for your new plug-in
    3. Execute d2-root\build_exploded.bat