Hitachi Vantara Pentaho Community Wiki
Child pages
  • 05. Build the application archives

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin


Wiki Markup
{scrollbar:up=false}





pentaho.war and pentaho.ear

The pentaho_j2ee_deployments-<version>.zip will build two different kinds of archives - .war file or .ear file. The .ear file has all of the files necessary for the Pentaho platform demo and samples to run successfully in the application server. The .war file only contains the Pentaho web application, under which case there is more work for you after you deploy the Pentaho .war file. The archives will be configured to run against hsqldb (hypersonic), mysql5, postgresql 8, and/or oracle10g. To do this, we must configure a number of files with the HOST and PORT of your database, including:

  • hibernate.cfg.xml
  • *-ds.xml files (for jboss) 

The build will make these replacements based upon values that it finds in the build.properties file. Specifically, the build will be looking for the following properties:

  • hsqldb.jdbc.port
  • mysql.jdbc.port
  • hsqldb.jdbc.host
  • mysql.jdbc.host
  • postgresql.jdbc.port
  • postgresql.jdbc.host
  • oracle.jdbc.port
  • oracle.jdbc.host

Without modification, these properties are set to their defaults:

  • hsqldb.jdbc.port=9001
  • mysql.jdbc.port=3306
  • hsqldb.jdbc.host=localhost
  • mysql.jdbc.host=localhost
  • postgresql.jdbc.port=5432
  • postgresql.jdbc.host=localhost
  • oracle.jdbc.port=1521
  • oracle.jdbc.host=localhost

Here's how to do it:

1. Download and unpack the pentaho_j2ee_deployments-<version>.zip file into a working directory. For our examples here, we will use D:\work.
2. Decide which archive you want to build:

  • .war file configured for Tomcat 5.X and hsqldb
  • .war file configured for Tomcat 5.X and mysql5
  • .war file configured for Tomcat 5.X and postgresql
  • .war file configured for Tomcat 5.X and oracle10g
  • .war file configured for JBoss 4.2.1 (with jboss portal installed) and hsqldb
  • .war file configured for JBoss 4.2.1 (with jboss portal installed) and mysql
  • .war file configured for JBoss 4.2.1 (with jboss portal installed) and postgresql
  • .war file configured for JBoss 4.2.1 (with jboss portal installed) and oracle10g
  • .war file configured for JBoss 4.2.1 (without jboss portal installed) and hsqldb
  • .war file configured for JBoss 4.2.1 (without jboss portal installed) and mysql
  • .war file configured for JBoss 4.2.1 (without jboss portal installed) and postgresql
  • .war file configured for JBoss 4.2.1 (without jboss portal installed) and oracle10g
  • .ear file configured for JBoss 4.2.1 and hsqldb (with jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and mysql (with jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and postgresql (with jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and oracle10g (with jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and hsqldb (without jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and mysql (without jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and postgresql (without jboss portal installed)
  • .ear file configured for JBoss 4.2.1 and oracle10g (without jboss portal installed)

3. Open a terminal window (*nix) or command prompt (Windows).
4. Change directory to the work directory where you unzipped the deployment bundle.
5. Execute the Ant command that is appropriate for the archive of your choice.

The command will be:

Code Block
ant <ant_target>

where <ant_target> is one of the following:

  • war-pentaho-tomcat-hsqldb
  • war-pentaho-tomcat-mysql
  • war-pentaho-tomcat-postgresql
  • war-pentaho-tomcat-oracle10g
  • war-pentaho-jboss-hsqldb - for use with a jboss server that has jboss portal installed
  • war-pentaho-jboss-hsqldb-no-portal - for use with a jboss servet that does not have jboss portal installed
  • war-pentaho-jboss-mysql - for use with a jboss server that has jboss portal installed
  • war-pentaho-jboss-mysql-no-portal - for use with a jboss servet that does not have jboss portal installed
  • war-pentaho-jboss-postgresql - for use with a jboss server that has jboss portal installed
  • war-pentaho-jboss-postgresql-no-portal - for use with a jboss servet that does not have jboss portal installed
  • war-pentaho-jboss-oracle10g - for use with a jboss server that has jboss portal installed
  • war-pentaho-jboss-oracle10g-no-portal - for use with a jboss servet that does not have jboss portal installed
  • ear-pentaho-jboss-hsqldb - for use with a jboss server that has jboss portal installed
  • ear-pentaho-jboss-hsqldb-no-portal - for use with a jboss servet that does not have jboss portal installed
  • ear-pentaho-jboss-mysql - for use with a jboss server that has jboss portal installed
  • ear-pentaho-jboss-mysql-no-portal - for use with a jboss servet that does not have jboss portal installed
  • ear-pentaho-jboss-postgresql - for use with a jboss server that has jboss portal installed
  • ear-pentaho-jboss-postgresql-no-portal - for use with a jboss servet that does not have jboss portal installed
  • ear-pentaho-jboss-oracle10g - for use with a jboss server that has jboss portal installed
  • ear-pentaho-jboss-oracle10g-no-portal - for use with a jboss servet that does not have jboss portal installed


So, for example, if you wanted to build a .war file for Tomcat on Windows, the command would look similar to this:

Code Block
D:\work> ant war-pentaho-tomcat-hsqldb

Wait for the build script to finish. The resulting .ear or .war file can be found under the /build/pentaho-wars/<appserver> subdirectory, which is created in your work directory.

pentaho-style.war and sw-style.war

If you are deploying the platform as a .war file, you may be missing some other key components - the pentaho-style.war, the steel-wheels-style.war, and the pentaho-portal-layout.war. For the sake of easy and maintainable style customization, we have moved the content styling for the platform into the separate styles web application.

No need to worry about this if you built and deployed an .ear file - the .ear package includes all extra web resources that the platform needs.

So all you need to do here is simply deploy the pentaho-style.war, the steel-wheels-style.war, and the pentaho-portal-layout.war. into the same application server along side the platform.

Execute the following command:

Code Block
ant zip-pentaho-style-war

And when that's finished, execute the following command:

Code Block
ant zip-pentaho-steel-wheels-style-war

And when that's finished, execute the following command:

Code Block
ant zip-pentaho-portal-layout-war

You can find all of the wars/ears in the following path, /work/build/pentaho-wars

Now that you have built the appropriate archive for your application server, you can deploy the platform. Deployment procedures are going to be specific to the application server that you use, which we assume you are already familiar.

Info
titleRemember

If you have any problems getting the platform deployed, post your dilemma in our discussion forum at http://forums.pentaho.org and chances are someone has found a solution or can help find one. Post your successes too, and how you managed it!


Tip

You can build everything at once and just use what you need. To do this just run:

Code Block
ant build-all



Wiki Markup
{scrollbar:up=false}