Setup an IDEA project for PillarOne (OUTDATED)
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
- Start IDEA
- If a project is open, then close it (Menu File > Close Project)
Plugin Installation
- Click on Open Plugin Manger in the right column
- 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.
- Further recommended plugins: Native Neighbourhood
Get the Sources
- Click on Check out from Version Control in the left column below Quick Start and select Subversion.
- 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). - Select the added item and click on Check Out and select a destination directory in the next dialog.
- If you are asked about the Working Copy Format, select 1.6.
- You should go for a coffee as checking out the sources will take a while.
- Decline when asked to create an IDEA project for the checked out sources.
Setup the Project
- Click on open project and select the file trunk/RiskAnalytics/RiskAnalytics.ipr
- Adjust the project structure
- Open the dialog by clicking on File > Project Structure
- 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.
- 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.
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\*


subversion account