Build and Deploy Pentaho

Build Pentaho as follows:

  1. Checkout the necessary sources from subversion:
    1. mkdir pentaho-dev
    2. cd pentaho-dev
    3. svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho/branches/1.7 pentaho (Checkout Pentaho core code)
    4. svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-data/trunk pentaho-data (Checkout pentaho data source)
    5. svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-solutions/trunk pentaho-solutions (Checkout pentaho solutions directory)
    6. svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-style/trunk pentaho-style (Checkout pentaho styles)
    7. svn co svn://source.pentaho.org/svnroot/legacy/pentaho-preconfiguredinstall/branches/1.7 pentaho-preconfiguredinstall (dependency for pentaho build script)
    8. svn co svn://source.pentaho.org/svnroot/legacy/pentaho-tomcat/branches/1.7 pentaho-tomcat (dependency for pentaho build script)
  1. Configure build properties
    1. Add a file called override.properties to the /pentaho directory.
    2. Add a line to override.properties that says javac.path=<path_to_javac>, where <path_to_javac> is the actual path on your machine to the java compiler (Remember to use forward slashes in Windows - e.g., C:/Program Files/Java/jdk1.6.0_05/bin/javac)
  1. Configure the /pentaho/server/pentaho/webapp/WEB-INF/web.xml file
    1. Look the following tag and replace pentaho-solutions with the full path to the pentaho solutions directory that you checked out above.
        <context-param>
          <param-name>solution-path</param-name>
          <param-value>pentaho-solutions</param-value>
        </context-param>
      
    2. Look the following tag and replace localhost:8080 with the host:port of your Tomcat server if different.
        <context-param>
          <param-name>base-url</param-name>
          <param-value>http://localhost:8080/pentaho/</param-value>
        </context-param>
      
  2. Build
    1. From the /pentaho directory, run ant war-pentaho-tomcat-hsqldb
      • This will populate war files in /build/pentaho-wars/. The only war you want from here, however is /build/pentaho-wars/tomcat/hsqldb/pentaho.war
    2. From the /pentaho-style directory, run mvn package
      • This will create /pentaho-style/target/pentaho-style.war

Deploy Pentaho

GATHER currently deploys pentaho to Tomcat. The following instructions worked under Tomcat 5.5:

  1. Stop Tomcat.
  2. Copy /pentaho-data/lib/hsqldb.jar to <TOMCAT_HOME>/common/lib
  3. Edit the <TOMCAT_HOME>/conf/server.xml file, and add the following resource under the <GlobalNamingResources>...</GlobalNamingResources> tag:
    <Resource name="jdbc/gather"
                  auth="Container"
                  type="javax.sql.DataSource"
                  maxActive="10" 
                  maxIdle="5"
                  maxWait="5000"
                  username="sa"
                  password=""
                  factory="org.apache.commons.dbcp.BasicDataSourceFactory"
                  driverClassName="org.hsqldb.jdbcDriver"
                  url="jdbc:hsqldb:hsql://localhost/gather" />
    
  4. Add /pentaho/build/pentaho-wars/tomcat/hsqldb/pentaho.war and /pentaho-style/target/pentaho-style.war to the <TOMCAT_HOME>/webapps directory
  5. Make sure the data source is running (run either pentaho-data/start_hypersonic.sh or pentaho-data/start_hypersonic.bat)
  6. Start Tomcat.

References