Setup an IDEA project for PillarOne RiskAnalytics
Outdated
The following documentation is currently being replaced.
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.
This document applies to the code base as of version 0.5 and is updated for IntelliJ IDEA 9.
Prerequisities
- JDK 1.5 (download). If you are using a more recent JDK version avoid using language feature added after Java 5. You may use a more recent version JDK. However the codebase has to be compatible with Java 5 as many corporates didn't yet update to Java 6.
- IDEA 9.0.1 installed and running. (download). The ultimate edition is needed in order to run grails scripts from within IDEA. Using the free community version will require to run grails scripts in the command line.
Step by step
- Start IDEA
- If a project is open, then close it (Menu File > Close Project)
Get the Sources
Since version 0.5 the code base is modularized into core, application and property casualty. The core plugin includes the simulation engine and persistence functionality, the application plugin includes the user interface and the property casualty the business logic. Depending on your interest different setups are required. This documents describes the setup of a project to run the application. Links to different setups are at the bottom of this document.
Application Runner Setup
- 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/RiskAnalytics/trunk/ . This way you get the most recent code base of the business logic, an 'umbrella project' allowing you to start the user interface, documentation source code and a patched grails version. - 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 RiskAnalytics. This is the umbrella project. RiskAnalyticsPC contains the property casualty business logic. The documentation folder contains the LaTeX source and project files.
- It is necessary to set the grails and user home path.
- 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)
- Run the ant target compile.
- Depending on the operating systems and user rights there might be problems to create some paths automatically. If this is the case you get the following screenshot.
In order to resolve the problem the missing directories have to created manually. In most cases one has to add projects/RiskAnalytics/plugins manually. - During the first compilation additional plugins are downloaded into your user.home/.grails/1.2.0/projects/RiskAnalytics/plugins folder
- After the execution of compile, IDEA should look similar to the following screenshot. Below build any of the targets may be selected. Targets containing the word mysql won't work until a mysql database has been setup. Standalone will work without any further customization. All run-* scripts will start the application.
Further Reading
- Project setup for business logic development
- Project setup for framework development
- Recommended IDEA settings
- Optional but recommended: MySQL Setup
- Troubleshooting


Compiler out of memory
<grails command="compile" jvmargs="-Xmx2048m -XX:MaxPermSize=512m"/>