Personal tools
You are here: Home Community Help Center How-tos Setup an IDEA project for PillarOne (OUTDATED)

Setup an IDEA project for PillarOne (OUTDATED)

To easily browse and work on the PillarOne sources we recommend setting up a project in an IDE (integrated development environment). As the PillarOne sources are mainly Groovy and Java classes, we recommend IDEA, which currently has the best Groovy support.

Purpose

This document is intended for community members interested in the source code and recent developments of the PillarOne code base. It describes how to setup PillarOne projects in IDEA. Other IDEs like Eclipse or NetBeans should work too, but offer a less smooth integration of Groovy and Java code.

Prerequisities

  • JDK 1.5 (download). If you are using a more recent JDK version avoid using language feature added after Java 5.
  • IDEA 8.1 installed and running. (download)

Step by step

  1. Start IDEA
  2. If a project is open, then close it (Menu File > Close Project)

Plugin Installation

  1. Click on Open Plugin Manger in the right column
  2. Click on the Available tab and search for JetGroovy. Right click on it and select Download and Install. It might be that this plugin is already installed in your IDEA version.
  3. Further recommended plugins: Native Neighbourhood

Get the Sources

  1. Click on Check out from Version Control in the left column below Quick Start and select Subversion.
  2. In the dialog Checkout from Subversion, click on the + symbol and enter the url of the PillarOne repository:
    https://svn.intuitive-collaboration.com/PillarOne/trunk/ . This way you get the most recent code base. (The current repository contains RiskAnalytics only. The code for the reserving application will soon be moved to the same repository, as well).
  3. Select the added item and click on Check Out and select a destination directory in the next dialog.
  4. If you are asked about the Working Copy Format, select 1.6.
  5. You should go for a coffee as checking out the sources will take a while.
  6. Decline when asked to create an IDEA project for the checked out sources.

Setup the Project

  1. Click on open project and select the file trunk/RiskAnalytics/RiskAnalytics.ipr
  2. Adjust the project structure
    1. Open the dialog by clicking on File > Project Structure
    2. Project: Click on New and add a JSDK (path to your JDK installation, e.g. C:\Program Files\Java\jdk1.5.0_15)

Request of ULC Developer License

ULC is a commercial product; hence, we must not distribute it together with the PillarOne sources. As a PillarOne developer you get a free license. Use this form in order to get a free ULC developer license for the PillarOne project from Canoo Engineering.

 

Recommended IDEA Settings

  • IDE Settings > Editor: Virtual Space
    Disable 'Allow placement of caret after end of line'
  • IDE Settings > Code Completion
    Reduce the autopopup time after dot (ms)
  • IDE Settings > Debugger > Stepping
    Add the following patterns to 'Do not step into the classes'
    • groovy.*
    • org.codehaus.*

Verify your Project Setup

  • Execute ant cruise in order to build and test the whole project. Ant targets can be found by clicking on the Ant Build button at the right side. In order to execute an ant target, simply double click on it.
    Ant Cruise
  • Start the application selecting one of the items RiskAnalytics (...). dev, test and standalone should work without any further configuration steps and clicking then on the green arrow on the right of the combobox.
    Start Application in IDEA


Optional: MySQL Setup

The database which comes bundled with PillarOne is mostly useful to test the application or components / models. For operational use of PillarOne, i.e. storing numerous simulation results each of which may contain a couple of hundred thousand of floating point numbers, we recommend using a professional database. This impoves the performance significantly and in multi-user mode also allows additional security.

In the following we describe how to set up MySQL as the back-end for PillarOne. Any other professional database product can be used, as well. Get in touch with us if you want to run it on Oracle, DB2 or whatever.

Because PillarOne uses partitioned tables, MySQL 5.1 or newer is required.

MySQL can be downloaded from http://www.mysql.com

After the installation, create a database and user with the following SQL commands:

create database p1rat;
create user 'p1rat'@'localhost' identified by 'p1rat';
grant all on table p1rat.* to 'p1rat'@'localhost';
grant file on *.* to 'p1rat'@'localhost';

The last command allows the user to save results using bulk insert, which is much faster than working with normal inserts. Don't worry, PillarOne handles this for you.

This is sufficient to run RiskAnalytics with MySQL. But if you want to benefit from additional performance enhancements, then you have to run a grails script, which initializes partitioned tables and optimized indices before RiskAnalytics is used for the first time. Execute the following commands in the RiskAnalytics directory:

setEnv.cmd
grails -Dgrails.env=mysql init-database

This can also be used to drop all saved data to create a clean database.

Troubleshooting

  • If ant targets don't work, check the properties by right clicking on RiskAnalytics-build. The list should contain a property with name env.GRAILS_HOME and value ../grails.
  • If you suddenly get strange and unexplainable error messages, you should apply the following recipe to clear all caches:
    • execute the ant clean target in IDEA or grails clean on the command line
    • remove the following folders in your user home directory:
      • .grails/1.0.4/projects/RiskAnalytics
      • .IntelliJIdea8x\system\compiler\*

 

Document Actions

subversion account

Posted by Devin Tey at 10.03.2009 11:43
when/how is the sources open for public? Currently can't check out from the version control system.

subversion account

Posted by Stefan Kunz at 10.03.2009 16:42
We will grant anonymous access to the subversion just before the conference in Brussels, which starts on April, 1.

subversion account

Posted by Benoit butel at 27.03.2009 16:38
SVN account requires username and password : which one must we use ?

subversion account

Posted by Stefan Kunz at 18.04.2009 22:45
Anonymous read access has been granted. So, no credentials are required.