Personal tools
You are here: Home Community Help Center How-tos Setup an IDEA project for PillarOne RiskAnalytics as of v1.1

Setup an IDEA project for PillarOne RiskAnalytics as of v1.1

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.

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 are currently not used by the core development team.
This document applies to the code base as of version 1.1.1 and is updated for IntelliJ IDEA 10.0.2

Background: As of version 1.1.1 we switched our code repositories completly to github. Git is a fast and distributed versioning system allowing to easily branch and merge.

Prerequisities

The following 'products' have to be installed:

  • JDK 6 (download). As of version 1.2 we no longer support Java 5.
  • Git client (download), installation hints
    • "Adjusting your PATH environment" -> "Use Git Bash only"

    • Use OpenSSH
    • Configuring the line ending conversions: checkout as-is, commit as-is
  • IDEA 10.5.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.

Get the Sources

All openly available sources are hosted at github, social coding.

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 openly available business logic for property casualty business. Depending on your interest different setups are required. This documents describes the setup of a project to run the application (RiskAnalyticsDevelopmentRunner). Links to different setups are at the bottom of this document.

If there is a proxy server within your organization you need to configure git accordingly:

git config --global http.proxy http://host:port

Step by step

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

Application Runner Setup

  1. Click on Check out from Version Control in the left column below Quick Start and select Git.
  2. In the dialog Clone Repository enter the following values:
  • Git Repository URL: http://github.com/pillarone/RiskAnalyticsDevelopmentRunner.git
  • Origin Name: RiskAnalyticsDevelopmentRunner
  • Parent Directory: E:\dev\pillarone\git or any other local directory
  • Directory Name: RiskAnalyticsDevelopmentRunner
git clone RiskAnalyticsDevelopmentRunner.git
  1. Cloning this repository you get an umbrella project allowing to execute RiskAnalytics. Additional repositories need to be cloned in order to easily work with the code.
  2. Decline when asked to create an IDEA project for the checked out sources.

Setup the Project

  1. Click on open project and select RiskAnalyticsDevelopmentProject.
  2. It is necessary to set the grails and user home path.
    SettingProjectVariables
    ExampleProjectPaths
  3. 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.6.0_22)

  4. Optional: Set the proxy within IDEA settings
  5. Optional: Modify the compile target directory
    By default grails targets will write their output to $USER_HOME/.grails/<grailsVersion>
    In order to modify this, add the following line in BuildConfig.groovy
    grails.project.work.dir = "work"

  6. Run the ant target compile.
    Ant Targets
    1. 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.
      Missing Paths

      In order to resolve the problem the missing directories have to created manually. In most cases one has to add projects/RiskAnalytics/plugins manually.
    2. During the first compilation additional plugins are downloaded into your user.home/.grails/1.3.4/projects/RiskAnalytics/plugins folder
    3. 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.
      Sucessful Setup of RiskAnalytics Project

Further Reading

 

 

Document Actions