How to build the Pentaho BIServer

From time to time, I get asked (on the ##pentaho irc channel in freenode) just how to build the Pentaho BIServer.  In this post, I’ll outline two methods for constructing a full Tomcat archive bundle which has the Pentaho BIServer installed.

First things first, checkout the source of what is known as the “BI Platform”.  These are the core pieces that comprise a BIServer.   Note: replace <path> with either “trunk”, or “tags/3.7.0-GA” or the like.

$ svn co svn://<path> bi-platform

Now that you have the source, you have two choices, full build or fast build.  There are advantages and disadvantages that I’ll outline below…

Full build (as release does it)..

Use this method if you wish to build a Tomcat archive that is as close to a released version as possible.  This is the method that most closely reflects the way that Pentaho cuts releases of the BIServer.  The disadvantage to this method it is more time consuming than “fast build” when doing iterative development.

  1. Change directory to the bi-platform-build project
    $ cd bi-platform-build
  2. Create an by copying and editing the properties.  Pay particular attention to “tomcat.dir”
  3. Build projects (cycles through individual projects and builds and publishes the jars locally)
    $  ant publish-all
  4. Assemble the compiled and published jars into the pentaho webapp installed to a Tomcat archive
    $ cd ../bi-platform-assembly
    $ ant -f assembly.xml clean-all resolve assemble

    The Tomcat archive will be located at the location specified by “stage.dir” in your

Fast build, aka “dev build” (recompile changed classes only)..

Use this method if you have made code changes and want to see them quickly reflected in a Tomcat archive.   Changed java files will be compiled to class files which will be placed in <tomcat>/WEB-INF/classes.

  1. Change directory to the bi-platform-build project
    $ cd bi-platform-build
  2. Create a by copying and editing the properties.  Pay particular attention to “tomcat.dir”
    which must point to a vanilla extracted Tomcat (version 6)
  3. Build the Tomcat archive from scratch, placing classes in WEB-INF/classes of the pentaho webapp
    $ ant -f dev_build.xml -Djavac.deprecation=false dev-rebuild
  4. After this has completed, you can make changes to individual projects and just build the changes with the “dev-update” target:
    $ ant -f dev_build.xml dev-update

    The Tomcat archive will be located at the location specified by “stage.dir” in your  It is a good idea to restart Tomcat after making changes to class files.

  5. Just a few notes regarding this method.  There are a few known problems, I’ll list the ones I know about here:
    • If you have made dependency changes to your project, i.e. changes to ivy.xml, do not use the fast build as your new dependencies will not be brought into tomcat; instead, use the full build.
    • If you are using this method while changing non-Java resource files, beware that sometimes your changes will not be moved to Tomcat during a dev-update
    • There is a current bug in this method that causes web applications to fail to compile due to a missing servlet-api.jar.  To get around this, grab the servlet-api.jar from your target Tomcat and place it or link it to WEB-INF/lib so your code will compile.  Alternatively, you can modify the classpath path in the build.xml script to reflect the location of your servlet-api.jar

This is not a comprehensive guide to build Pentaho BIServer by any stretch but I hope it does help developers to understand what build options are available.

Community Build Framework

There is a third option, CBF, which is a consultant/solution developer oriented abstraction that is built on the “fast build” scripts.  I won’t go into details here, just link you to



About phytodata

Lead software engineer with broad experience over 13 years designing and writing Java based open source and commercially licensed applications ranging from healthcare to banking to business intelligence and telecom.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

4 Responses to How to build the Pentaho BIServer

  1. swathi says:

    i want to integrate pentaho with my web application which is in struts2.0 i dnt knw how to integrate can u pls tell me step by step procedure of how to integrate and how to generate report in web application

  2. phytodata says:

    questions like that are good for the Pentaho forums, Pentaho wiki or ##pentaho freenode IRC channel

  3. Vasili says:

    I’ve checked these steps against Windows Vista Home Premium 64-bit. I was trying to assembly bi-server 4.1.3. The build fails: ant tool can’t compile mantle module, most probably because of restrictions on command line parameters length.
    On Ubuntu machine everything goes perfect, just as described here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s