blob: acacd1dd95953433906bc1853a361f35650e144b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> How To Build BIRT from CVS </TITLE>
<link rel="stylesheet" href="../style/compose.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<p class="head">How To Build BIRT from CVS</p>
<p class="subhead">Doing Your Own BIRT Build</p>
<h1>Introduction</h1>
This document describes how to get the BIRT source from CVS and build it under
Eclipse. If you simply want to use BIRT, it is easier to simply
<a href="http://download.eclipse.org/birt/downloads">download</a> an existing build.
<h1>Requirements</h1>
In order to successfully build and run the BIRT source, your system must meet
the following requirements:
<ul class="arrow-list">
<li>Eclipse Release 3.0.1 or higher</li>
<li>JDK 1.4 or higher</li>
<li>GEF 3.0.0 or higher</li>
<li>EMF 2.0.1 or higher</li>
</ul>
<h1>Configuring Your Eclipse Workbench</h1>
The BIRT source code uses some features that are only present in JDK 1.4.
In order for it to successfully build you need to set your compiler compliance
to 1.4.
You can set this for the entire workbench as follows:
<ol>
<li>From the menu, choose Window->Preferences.</li>
<li>In the tree, expand Java and choose Compiler.</li>
<li>On the tabs on the right, choose Compliance and Classfiles.</li>
<li>On Compiler compliance level, select 1.4.</li>
<li>Unselect Use default compliance settings.</li>
<li>On Generated .class files compatibility, select 1.4.</li>
<li>On Source compatibility, select 1.4.<br><br>
The following illustration shows these settings.<br><br>
<img src="images/compliancepreference.jpg" width="672" height="539"/><br><br></li>
<li>Choose OK.</li>
</ol>
<h1>Understanding the CVS Structure</h1>
The BIRT modules are available in CVS in the <a href="http://dev.eclipse.org/viewcvs/index.cgi/source/?cvsroot=BIRT_Project">source</a> folder under
<a href="http://dev.eclipse.org/viewcvs/index.cgi/?cvsroot=BIRT_Project">
/home/birt</a>.
BIRT consists of the following modules.
<table class="simple-table">
<thead>
<th>Project Folder </th>
<th>Contents</th>
</thead>
<tbody>
<tr>
<td>org.eclipse.birt.chart.device.extension</td>
<td>Extension classes for the device renderer framework for charts</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.engine</td>
<td>Chart model and factory classes</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.engine.extension</td>
<td>Extension classes for the model renderer framework for charts</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.reportitem</td>
<td>Classes for the chart module to interact with the BIRT designer and
runtime engine</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.shared</td>
<td>Classes shared between different components of the chart module</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.ui</td>
<td>Chart builder UI classes</td>
</tr>
<tr>
<td>org.eclipse.birt.chart.ui.extension</td>
<td>Extensions for the chart builder UI</td>
</tr>
<tr>
<td>org.eclipse.birt.converters</td>
<td>Contains converters that can convert reports from other formats to the BIRT report format</td>
</tr>
<tr>
<td>org.eclipse.birt.core</td>
<td>Provides the framework for loading the plugins at run-time and
contains other classes that can be used by any other module</td>
</tr>
<tr>
<td>org.eclipse.birt.data</td>
<td>Provides the data engine implementation and the ODA factory implementation. It also contains classes for applying transformations on the data.</td>
</tr>
<tr>
<td>org.eclipse.birt.data.oda</td>
<td>ODA public interface: the classes and interfaces used to create data
extensions.</td>
</tr>
<tr>
<td>org.eclipse.birt.data.oda.jdbc</td>
<td>The ODA driver for accessing JDBC data sources</td>
</tr>
<tr>
<td>org.eclipse.birt.data.oda.jdbc.ui</td>
<td>The user interface for the ODA JDBC driver</td>
</tr>
<tr>
<td>org.eclipse.birt.report.designer.core</td>
<td>The core classes of the BIRT report designer, including classes that
interact with the BIRT model, and localization and other utility classes</td>
</tr>
<tr>
<td>org.eclipse.birt.report.designer.tests</td>
<td>The unit test classes for the designer project</td>
</tr>
<tr>
<td>org.eclipse.birt.report.designer.ui</td>
<td>The BIRT report designer</td>
</tr>
<tr>
<td>org.eclipse.birt.report.engine</td>
<td>The BIRT reporting engine that generates the report from a report design</td>
</tr>
<tr>
<td>org.eclipse.birt.report.engine.emitter.fo</td>
<td>The emitter for generating report output using FO</td>
</tr>
<tr>
<td>org.eclipse.birt.report.engine.emitter.html</td>
<td>The emitter that generates report output in HTML</td>
</tr>
<tr>
<td>org.eclipse.birt.report.model</td>
<td>The BIRT report model</td>
</tr>
<tr>
<td>org.eclipse.birt.report.viewer</td>
<td>The BIRT report viewer (BIRT web app)</td>
</tr>
<tr>
<td>org.eclipse.birt-feature</td>
<td>The BIRT feature</td>
</tr>
</tbody>
</table>
<h1>Checking out Code from CVS</h1>
<h2>Configure the Repository under Eclipse</h2>
<ol>
<li>To open the CVS Repository Exploring perspective, choose Window -&gt;
Open Perspective -&gt; Other. In Select Perspective, select CVS Repository
Exploring and choose OK.<br><br>
<img src="images/selectperspective.jpg" width="245" height="420"/><br><br>
<li>Right-click on the CVS repositories window. From the context menu,
choose New -&gt; Repository Location.<br><br>
<img src="images/newrepository.jpg" width="485" height="361"/><br><br>
<li>On Add CVS Repository, set the following values:<br><br>
<table class="simple-table">
<tbody>
<tr>
<td>Host</td>
<td>dev.eclipse.org</td>
</tr>
<tr>
<td>Repository path</td>
<td>/home/birt</td>
</tr>
<tr>
<td>User</td>
<td>anonymous</td>
</tr>
<tr>
<td>Connection type</td>
<td>pserver</td>
</tr>
<tr>
<td>Use Default Port</td>
<td>Selected</td>
</tr>
</tbody>
</table>
<br/>
<img src="images/addcvsrepository.jpg" width="438" height="551" /><br/><br/>
<li>Choose Finish.
</ol>
A new node appears in the CVS Repositories window.
<h2>Check Out Code for the First Time</h2>
<ol>
<li>Expand the new node in the repositories tree, then the head node and
the source node.
<li>Select all the nodes under this node as shown in the image below. On CVS Repositories, right-click and choose
Check Out from the context menu.<br/><br/>
<img src="images/checkout.jpg" width="461" height="531" /><br/><br/>
This choice gets all the BIRT projects from CVS into your Eclipse workspace folder.
</ol>
<h1>Building the BIRT Projects</h1>
Eclipse automatically starts compiling the projects after completing checking
them out.
All of the projects except converters should compile without any problems on a
system that satisfies all the requirements in section 1.
Compiling the converters project requires the Jasper Reports library. If you need
to compile this project, download this library from
<a href="http://jasperreports.sourceforge.net/">
http://jasperreports.sourceforge.net/</a>.
<h1>Preparing the Viewer</h1>
To include all the required project libraries under the viewer's WEB-INF folder,
you must build the viewer separately.
The viewer project contains an ant build script that performs this task. To use
this script, perform the following steps.
<ol>
<li>In Package Explorer, expand the org.eclipse.birt.report.viewer project.
<li>Right-click the BuildViewer.xml file. From the context menu, choose Run -&gt;
Ant Build.
<br/><br/>
<img src="images/runantbuild.jpg" width="541" height="682" />
<br/><br/>
<li>In org.eclipse.birt.report.viewer BuildViewer.xml, select the Properties tab.
Unselect Use global properties specified in the Ant runtime preferences
as shown in the following illustration.
<br/><br/>
<img src="images/runantbuildproperties.jpg" width="648" height="560" />
<br/><br/>
<li>This script is configured to work with Eclipse 3.0, GEF 3.0 and EMF 2.0.1. If you are using a
newer version, you need to add the properties eclipse.version, gef.version, emf.version respectively.<br/>
<ol>
<li>On the Properties tab, choose Add Property. Add Property appears.
<li>In Name, type: eclipse.version
<li>In Value, type the version of Eclipse, similar to the following illustration.
<br/><br/>
<img src="images/addproperty.jpg" width="372" height="174" />
<br/><br/>
<li>Choose OK.
<li>Do the same steps for gef.version and emf.version
</ol>
<li>Choose Run. The ant build of the viewer runs in the console.
</ol>
<h1>Running BIRT</h1>
Start BIRT by using the Runtime Workbench. This can be done as follows:
<ol>
<li>
Select Run... from the Run menu on the menu bar
<br/><br/>
<img src="images/run.jpg" width="371" height="399" />
<br/><br/>
</li>
<li>
Select Runtime Workbench from the list on the left and click on the New button as shown in the following illustration:
<br/><br/>
<img src="images/neweclipseapplication.jpg" width="624" height="560" />
<br/><br/>
</li>
<li>
Click the Run button to launch the Runtime Workbench.
<br/><br/>
<img src="images/runeclipseapplication.jpg" width="666" height="615" />
<br/><br/>
</li>
</ol>
</BODY>
</HTML>