This document describes the steps for setting up the development environment, getting the Pentaho Platform code from GitHub and the tools required to build the platform code. It also outlines the process of building, deploying and debugging the local instance of Pentaho BA server on your machine.

Setting Environment

Following are the list of tools required to build the Pentaho Platform code on your machine 

The Java Development Kit (JDK)

The Pentaho Platform 7.0 is built and tested using JDK 8. If it is not already installed, please download it here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Git and GitHub

At Pentaho, we use Git for version control and store our repositories on GitHub. The Pentaho Platform code is stored in a GitHub repository at https://github.com/pentaho/pentaho-platform. These instructions will help you clone the pentaho-platform GitHub repository to get ready for development if you are unfamiliar on how to do so.

Apache Ant

Apache Ant is a Java library and command line tool primarily used for the building of Java Applications. At Pentaho, we use Ant to build many of our projects. If you would like to learn how to install Ant and it to build the Pentaho Platform, please follow these instructions.

Install

Maven

Maven is a software project management and comprehension tool also used in the building of Java applications. At Pentaho, we currently use both Ant and Maven for our project builds. The installation process for Maven is very similar to the Ant process, as described below.

Install

Eclipse IDE

Choosing the Java IDE is a matter of preference. This document describes setting up Eclipse IDE for building and debugging the code. Download the latest Eclipse IDE for Java EE developers from the Eclipse project page and follow the instructions to install Eclipse on you machine.

Eclipse Plugins

Once the Eclipse is installed, download the following plugins-

Instruction to setup platform code in Eclipse

Follow the steps to setup Pentaho-platform code in Eclipse

For windows environment, make sure to choose a short folder name for folder where the pentaho-platform code is stored. This is required to ensure that the build path does not exceed the maximum length.

Building the code in Eclipse

There are two ways to build the code in Eclipse

Using Ant

Following are the steps to build the project using Ant

          

Using IvyDE

Following are the steps to build the project using IvyDE toolto build the project dependencies

           

Debugging Pentaho platform code in Eclipse

In order to debug the pentaho platform code, we will need to create a local installation of Pentaho server. Following are the steps to create local installation of pentaho server

Setting up Eclipse debugger

Following are the steps to start a debug session 

           

IntelliJ IDEA

JetBrains' IntelliJ IDEA is another potential Java IDE choice for development on the Pentaho Platform. Please note that some features of IntelliJ IDEA may require an Ultimate license for development on the Pentaho Platform.

Checkstyle

At Pentaho, we use the Checkstyle plugin for IntelliJ IDEA to ensure new code meets our coding standards. Below are the instructions for installing and running the Checkstyle plugin within IntelliJ IDEA.

For the next steps, you will need Pentaho's Checkstyle standards which is located in the pentaho-coding-standards repository located on GitHub (https://github.com/pentaho/pentaho-coding-standards). Please fork this repository and clone it on your local machine.

At this point, Checkstyle should be successfully installed and configured inside of IntelliJ IDEA. To run a Checkstyle audit on a file, follow these instructions.

Code Style

The pentaho-coding-standards/README.md explains how to set an appropriate project Code Style (this is separate from the check style).

Resolve Dependencies

To resolve your project dependencies, simply right click the pom.xml of your project, and select "Add as maven project"

Setting Up Debugging