Build and Deploy Pentaho
Build Pentaho as follows:
- Checkout the necessary sources from subversion:
- mkdir pentaho-dev
- cd pentaho-dev
- svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho/branches/1.7 pentaho (Checkout Pentaho core code)
- svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-data/trunk pentaho-data (Checkout pentaho data source)
- svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-solutions/trunk pentaho-solutions (Checkout pentaho solutions directory)
- svn co http://code.dimagi.com/svn/Gather/pentaho/pentaho-style/trunk pentaho-style (Checkout pentaho styles)
- svn co svn://source.pentaho.org/svnroot/legacy/pentaho-preconfiguredinstall/branches/1.7 pentaho-preconfiguredinstall (dependency for pentaho build script)
- svn co svn://source.pentaho.org/svnroot/legacy/pentaho-tomcat/branches/1.7 pentaho-tomcat (dependency for pentaho build script)
- Configure build properties
- Add a file called override.properties to the /pentaho directory.
- 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)
- Configure the /pentaho/server/pentaho/webapp/WEB-INF/web.xml file
- 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> - 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>
- Look the following tag and replace pentaho-solutions with the full path to the pentaho solutions directory that you checked out above.
- Build
- 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
- From the /pentaho-style directory, run mvn package
- This will create /pentaho-style/target/pentaho-style.war
- From the /pentaho directory, run ant war-pentaho-tomcat-hsqldb
Deploy Pentaho
GATHER currently deploys pentaho to Tomcat. The following instructions worked under Tomcat 5.5:
- Stop Tomcat.
- Copy /pentaho-data/lib/hsqldb.jar to <TOMCAT_HOME>/common/lib
- 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" /> - Add /pentaho/build/pentaho-wars/tomcat/hsqldb/pentaho.war and /pentaho-style/target/pentaho-style.war to the <TOMCAT_HOME>/webapps directory
- Make sure the data source is running (run either pentaho-data/start_hypersonic.sh or pentaho-data/start_hypersonic.bat)
- Start Tomcat.
