02. Exploring the Pentaho Repository in 2.0
Exploring the Pentaho Repository in 2.0
This Step's Objective
This step briefly explains the project code repository, the projects involved in the server platform, and some project anatomy standards. At the end of this step, you should have a basic understanding of the server platform's project scope and structure, but no action is required. Downloading the projects is the subject of the next step.
The Pentaho BI Platform code is stored in a Subversion repository at svn://source.pentaho.org/svnroot or http://source.pentaho.org/svnroot. The projects that start with "bi-platform-" can be found in bi-platform-v2/trunk. If you have no experience with Subversion, you may want to take a look at its online documentation.
The Pentaho projects in Subversion that you need are:
- bi-platform-api/ - This project contains the external Application Programming Interface into the Pentaho project.
- bi-platform-appserver/ - This project contains configuration files specific to different application servers and is used by the assembly project.
- bi-platform-assembly/ - This project contains the scripts necessary to assemble and package the Pentaho BI Platform
- bi-platform-build/ - This project contains the build script which will build all the other projects at the same time.
- bi-platform-engine-core/ - The heart of the Pentaho engine.
- bi-platform-engine-security/ - The security layer of the Pentaho engine.
- bi-platform-engine-services/ - The portion of the engine that deals with the action sequences.
- bi-platform-legacy/ - This project contains legacy code used to maintain backward compatibility with previous versions of the Pentaho platform.
- bi-platform-plugin-actions/ - This project contains all the action components that can be "plugged in" to the engine.
- bi-platform-plugin-services/ - This project contains all the service components that can be "plugged in" to the engine.
- bi-platform-repository/ - This project contains the code which accesses the solutions repository.
- bi-platform-sample-data/ - This project contains the sample data used with the PCI.
- bi-platform-sample-solution/ - This project contains the solution repository for the PCI.
- bi-platform-scheduler/ - This project contains the ability to manage the scheduling of actions.
- bi-platform-security-userroledao/ - This project contains a data access layer for platform user management & security
- bi-platform-ui-foundation/ - This project contains the foundation for the UI of the PCI.
- bi-platform-util/ - This project contains the utilities classes for the platform.
- bi-platform-web/ - This project supports the web based interface to the PCI.
- bi-platform-web-portlet/ -
- bi-platform-web-servlet/ -
- mantle - The GWT Front End of the BI Platform, also known as the User Console
- pentaho-open-admin-console - The Admin Console, used to manage Users and Data Sources
Project anatomy
my-pentaho-proj/ |-- eclipse-bin |-- bin | |-- classes | |-- javadoc | |-- reports | | |-- cobertura | | | |-- html | | | `-- xml | | `-- test | | |-- html | | `-- xml | `-- test | |-- classes | |-- cobertura-bin | `-- instrumented-classes |-- dev-lib |-- dist |-- lib |-- src |-- test-src `-- test-lib
Sources
- src - Application source code
- test-src - Test source code
Libs
- lib - Directory where IVY will deposit "default" (compile-time) dependencies, when it is asked to retrieve them (
ant resolve-default
). - test-lib - Directory where IVY will deposit "test" dependencies, e.g. junit4.jar, when it is asked to retrieve them (
ant resolve-test
). - dev-lib - non-IVY directory where developer can temporarily link jars into the project. Common build will look for jars in dev-lib and include them in the build.
dev-lib
should never be committed to SVN!When developing with the IVY Eclipse plugin, ivyDE, IVY-populated lib directories are ignored. Your Eclipse project will reference jars outside of the project space, in
.ivy2/cache
.
Notable Files
- build.xml - Ant build file for the Pentaho project. This build file includes the common_build.xml and defines any project specific build functionality.
- common_build.xml - Standardized Ant build file for all Pentaho projects
- ivy.xml - Defines all the dependencies for the Pentaho project.
Distributable Archives
- dist - Archive files produced by the build are placed in
dist
, this would include .jar, .zip, .tar.gz, .war, .ear, etc.
All Other Build Output
Build output has typically been placed in mix of hierarchical and flat directories from the project root. In an effort to tidy up the project workspace, bin
has been reorganized to become the root of the hierarchy of all (non-archive) build output.
- bin/classes - Classes compiled from project application source code are placed here. Compiled classes used to be placed directly in
bin
, keep that in mind if you run into strange behavior such as incorrect jar content from your custom build scripts. - bin/test - Root directory for any resources that may be needed to run unit tests, such as compiled test code and instrumented application source code (for code coverage tools)
- bin/reports - Root directory for all kinds of reports the build might generate about the project, e.g. JUnit test reports, Cobertura or Clover coverage reports, FindBugs static analysis reports.
- bin/javadoc - Javadoc html is placed here for browsing (javadoc may also be archived as a zip or targz in which case the archive would be placed in
dist
).
eclipse-bin - Eclipse will place compiled java classes here as opposed to bin which is reserved for the Ant-based build. The two are kept separate so Eclipse will not compete with Ant.
About the Build Files
In version 2.0, the build.xml file has been completely redesigned. Instead of one file (per project), it is now two: build.xml, and common_build.xml. The former is only an override file for targets, and the latter contains the default targets. So common_build.xml is listed as an include in build.xml, meaning all of its contents are pulled into the build automatically. If you want to change a build target, do not edit common_build.xml directly. Instead, copy over the build target XML from common_build.xml into build.xml and change it accordingly.
The BI Platform Sample Data Project
The Pentaho BI Platform ships with a set of default databases (using Hypersonic SQL) to hold the necessary repositories for several feature components and subsystems. In order to get these parts of the platform up and running you need to have these repositories, which are stored in the bi-platform-sample-data module. Bi-platform-sample-data also includes startup and shutdown scripts for the databases:
Directory/File |
Description |
---|---|
/pentaho-data |
Root directory of database tree. |
/hsqldb |
Holds the platform, quartz, and sampledata scripts for Hypersonic SQL. |
start_hypersonic.bat |
Startup batch file for Windows platform; used to start the databases on Windows. |
start-hypersonic.sh |
Startup batch file for *nix platform; used to start the databases on *nix. |
stop_hypersonic.bat |
Shutdown batch file for Windows platform; used to shutdown the databases on Windows. |
stop-hypersonic.sh |
Shutdown batch file for *nix platform; used to shutdown the databases on *nix. |
Important
The bi-platform-sample-data module is structured to be a standalone component that acts as a database server. The scripts provided in the project start and shutdown the Hypersonic databases. The scripts rely on the Hypersonic JDBC classes being available in a /lib subdirectory under the bi-platform-sample-data directory. So in order to get these scripts running properly, you need to resolve the jar file via the ant build.xml provided. run ant resolve to download the driver.
The BI Platform Sample Solution Project
If your goal is to set up the platform as a Web application, or simply have a starting point for your own solutions, you must get the latest samples from Subversion. Setting up the samples is easy and provides a great way to test the various components in your deployment.
The samples are located in the bi-platform-sample-solution project. This set of samples demonstrates several component features of the platform, and also contains a set of clean configuration files.
To run the samples, you also have to download the default Hypersonic databases, explained above.
Directory/File |
Description |
---|---|
/pentaho-solutions |
Root directory of solution tree. |
/admin |
Root directory for the administrative samples. |
/samples |
Root directory for sample solution. |
/system |
The system directory contains all platform and component configuration information. |
/test |
Root directory for test solution. |