Project Source

Q: Where can I find the BIRT coding Styles?

Q: Where can I find the BIRT project source?

BIRT source is in the Eclipse CVS system. Full information for obtaining and building the source is available on the BIRT Build page.

Q: I'm behind a firewall and cannot access CVS. Is there another way to access the source?

Eclipse provides an HTML interface into CVS. Be sure to select the BIRT Project to see the BIRT sources.

Q: How do I build BIRT using the PSF File?

There are almost 300 individual source projects that are combined into the BIRT and Data Tools project. Rather than force you to pull each of these files from their respect repositories, the BIRT team provides Team Project Sets which bundle the projects into appropriate and useful collections of projects.

Builds Available

Each tagged build (Milestones and Releases) has a team project published through the download page. In addition, there is a Team Project Set for the Head release available Media:birt_psf_head.zip.

Available Project Sets

BIRT has twelve different team project sets that cover the functional pieces of BIRT (Engine, UI, Model,etc.) In order to pull a team project set, you use one of the project set files (PSF). If you would like to pull all of the BIRT and Data Tools projects, use the all_files.psf.

c) Extract all files (with paths preserved) to a base directory (I used c:\birtdev250). This should create a single eclipse subdirectory (c:\birtdev250\eclipse) containing all the needed files.

d) Create a shortcut to c:\birtdev250\eclipse\eclipse.exe.

2. Initial configuration.

a) Start the eclipse program.

b) Append "\birtdev250" to the workspace path to keep it separate from your other workspaces.

c) Select the checkbox "Use this as the default..." then press OK.

d) Click on the workbench icon.

e) Select Windows|Preferences from the menu.

f) Under Java|Compiler, set the Compiler Compliance Level to 5.0.

g) Under Java|InstalledJREs, add a Java 5 compiler (I used Suns latest Java 5, setting the JRE name to jre1.5.0 and the JRE home directory to C:\Program Files\Java\jre1.5.0_11, its default install location).

h) Make this the default for new projects by selecting its checkbox under Java|InstalledJREs.

i) Under General|Workspace, set Text file encoding as UTF-8

j) Let the workspace do its full rebuild.

3. Attach to the CVS repository.

a) Use Window|OpenPerspective|Other to list the available perspectives.

b) Select CVS Repository Exploring and click on OK.

c) Right-click in the CVS Repositories pane and select New|RepositoryLocation.

d) Enter dev.eclipse.org for the Host, /cvsroot/birt for the Repository Path and anonymous for the User. Click on Finish button.

e) Right-click on one of the selected projects and choose Check Out option.

f) It should start checking out 116 folders. Click the Run in Background button and switch back to the Java perspective (menu item Window|ClosePerspective).

g) At the bottom of the window, you should see the text "Checking out 116 folders from CVS (0%)". You can click on the "conveyer belt" icon to the right of this to open the Progress tab for more detail.

h/ Auto build will then start, this will also take some time and you'll see a lot of activity in the Progress tab if you opened it.

5. After all the projects have been built, you'll end up with 4 errors (see bug 281454 and 281453) and 24,284 warnings (see the Problems tab in the lower pane).

a) Copy the com.ibm.icu_*.jar from your ${eclipse.home}/plugins to org.eclipse.birt.chart.viewer/WebContent/WEB-INF/lib/.

b) Add "org.eclipse.jem.util" to the Require-Bundle in MANFIEST.MF of org.eclipse.birt.integration.wtp.ui and org.eclipse.birt.chart.integration.wtp.ui

c) Clean and re-build workspace, there should be 0 errors and 24,405 warnings.

Note that, if you don't have installed eclipse source bundles in your eclipse home, you may get errors in the org.eclipse.birt.report.designer.ui plugin. Please see details from Bug 310987

Q: How to Build BIRT 3.7.1+ from GIT?

According to Eclipse schedule, we start to build 3.7.1 from GIT repository

h) Auto build will start when finish importing, this will also take some time.

6. Fix errors.

a) After all the projects have been built, you'll end up with 1 error: An API baseline has not been set for the current workspace : org.eclipse.birt.report.engine.dataextraction

a) Select menu: Preferences -> Plug-in Development -> API Baselines. Press "Add Baseline...", then in the "New API Baseline" dialogue, press "Browse..." and choose the folder where your eclipse locates, then pick a name and Finish. Press OK in Preferences.

c) Clean and re-build workspace, there should be 0 errors.

Q: How do I build the 2.5 and 2.6 BIRT RCP Report Designer?

1. Install BIRT prerequisite in Eclipse home. (You can use the allinone download to get all prerequisites.)
2. Download or import BIRT source code in workspace, including org.eclipse.birt.report.designer.ui.rcp
3. Open BIRT.product file which is under org.eclipse.birt.report.designer.ui.rcp with Product Configuration Editor
4. In the "Overview" tab -> Exporting section, open the "Eclipse Product export wizard".
5. In the Export dialog, Set the exported Directory.
Deactivate the option "Generate metadata repository" in the Export dialog, which is not a necessary option when exporting a RCP product.Then click "Finish". The exporting of RCP should be started automatically and you will get the RCP under the directory when it finishes.

5. The PDE build will generate the build.xml under the root folder of org.eclipse.birt.report.viewer.

6. Right click on the build.xml. Select "Run As" -> "Ant Build..." to open the build configuration dialog.

7. In the build configuration dialog, switch to Main tab, set param ${buildDirectory} to your All-In-One home directory and ${build.from.workspace} to true. After setting, click "run" to start the build process.

8. When the build process is finished, refresh the project and viewservlets.jar can be found under birt/WEB-INF/lib/ folder. This jar is used with the Viewer when it is deployed as a J2EE application. Replace this jar in your existing deployment. The viewer.jar can be found under root folder. This jar is used when the Web Viewer is used in plugin format.

Q: How do I export the 2.2/2.3 BIRT web viewer?

1. Downloaded and installed the birt-report-designer-all-in-one.
2. Download 2.2.2 runtime package birt-runtime-2_2_2.zip.
3. Configure the cvs repository and checked out the project BIRT_2_2_2_Release 20080227 (Excluding org.eclipse.birt.build and all *.test, *.tests, *.releng.*, *.doc.isv, *.cshelp and org.eclipse.birt.report.engine.emitter.Prototype_excel).
4. Created build file from MANIFEST.MF in the org.eclpse.birt.report.viewer project
- Run build.xml as ant file.(Set ${buildDirectory} to your All-In-One installation home in build configuration dialog. Please see http://wiki.eclipse.org/BIRT/FAQ/Birt_Project#Q:_How_do_I_build_the_2.2.2F2.3.2F2.5_BIRT_Viewer.3F, step 7)
- You will get viewservlets.jar under org.eclipse.birt.report.viewer/birt/WEB-INF/lib/

- Run the auto-generated build.xml files of above plugins in workspace seperately. Api jars (coreapi.jar, dteapi.jar, modelapi.jar, modelodaapi.jar,odadesignapi.jar,engineapi.jar,scriptapi.jar,dataadapterapi.jar) will be generated automatically under those plugins.

8. Right click on ant file org.eclipse.birt.report.viewer/WebViewerPackager.xml -> Run As -> Ant Build...-> Swtich to "Main" tab -> Append one more argument: -Dexport.dir=<output dir of web viewer>
If you don't add this argument, the birt viewer will be exported under org.eclipse.birt.report.viewer/export by default.

10. Copy the file org.eclipse.birt.api_1.0.0.jar from the \birt-runtime-2_2_2\WebViewerExample\WEB-INF\platform\plugins directory to ${export.dir}\org.eclipse.birt.report.viewer\birt_web\WEB-INF\platform\plugins directory

11. Before deploy your web viewer to app server, rename the web_deploy.xml to web.xml (overwrite the original one).

Copy the file commons-logging-api-1.1.jar into the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\lib directory (needed for running under apache 6)

Copy the file org.eclipse.birt.api_1.0.0.jar from the \birt-runtime-2_3_1\WebViewerExample\WEB-INF\platform\plugins directory to <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\platform\plugins directory

Your can either drop the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\ directory into your application server's applications directory or Run the "Export" target of WebViewerPackager.xml and set the variable export.dir=<output dir of web viewer>.

Copy the file commons-logging-api-1.1.jar into the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\lib directory (needed for running under apache 6)

Copy the file org.eclipse.birt.api_1.0.0.jar from the \birt-runtime-2_5_0\WebViewerExample\WEB-INF\platform\plugins directory to <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\platform\plugins directory

Your can either drop the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\ directory into your application server's applications directory or Run the "Export" target of WebViewerPackager.xml and set the variable export.dir=<output dir of web viewer>.

Right-Click and selcet Check-Out-As. Refresh the tags and select the BIRT_3_7_0_Release_201106091010 version.

Right-Click the org.eclipse.birt.report.viewer project and choose "Switch to...", choose tag v20110723. We have update the build script a little to avoid failures when exporting viewer for the 3.7.0 version.

Since BIRT has migrated from CVS to Git since 3.7.2, you need to manually add a target in the WebViewerPackage.xml before running(#400702, this has been fixed in latest master branch for 4.2.2 release)

Copy the file commons-logging-api-1.1.jar into the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\lib directory (needed for running under apache 6)

Your can either drop the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\ directory into your application server's applications directory or Run the "Export" target of WebViewerPackager.xml and set the variable export.dir=<output dir of web viewer>.

Note that, please delete the <Eclipse-Birt-Project-Home>\org.eclipse.birt.report.viewer\birt_web\WEB-INF\platform before using. Since 3.7.0 release, birt no longer have WEB-INF\platform directory in runtime package.

Q: How do I export org.eclipse.birt.report.runtime jar for 3.7 BIRT web viewer?

Starting from BIRT 3.7.0 release, there is no platform/ folder under the WEB-INF/ in the runtime package(230149). There is only one single jar "org.eclipse.birt.report.runtime_*.jar" under the WEB-INF/lib folder, which includes all the BIRT classes.

Below are the steps how you can export the single org.eclipse.birt.report.runtime_*.jar from your workspace.

Right-Click the project org.eclipse.birt.build -> Export... -> Plugin Development -> Deployable plug-ins and fragments -> Next. Set the destination directory and click "Finish" to export the org.eclipse.birt.build_2.2.0.jar, which has a util to integrate BIRT classes into single jar.

Copy the exported org.eclipse.birt.build_2.2.0.jar to org.eclipse.birt.releng.birtbuilder/extras/

# directory where the org.eclipse.birt.report.runtime jar will be output

-DoutputDir=D:\eclipse\birt-runtime

# the plugin version of org.eclipse.birt.report.engine_*.jar. We need to exclude the 3rd party jars when integrate BIRT classes.

-Dorg.eclipse.birt.report.engine=2.6.1.v20100915.

Click "Run". After process, the org.eclipse.birt.report.runtime_*.jar will be outputed under ${outputDir}

Q: How can I generate org.eclipes.birt.api.jar for ReportEngine?

The framework fragment org.eclipse.birt.api is used to import the BIRT API jars into the OSGi framework, so the ReportEngine can be embedded into other framework (such as main app or J2EE).

The org.eclipse.birt.api bundle only contains a manifest file which exports all the packages defined in the BIRT API jars (include coreapi.jar, modelapi.jar, chartapi.jar etc). It locates under WEB-INF/platform/plugins folder.

You can get a tool from org.eclipse.birt.build/org.eclipse.birt.build.ExportManifestUtils which can be used to export the packages from the jars.
Below are suggested steps:

2. Run ExportManifestUtils.java as "Java Application". (There might be compile errors which is caused by missning dom4j library. Please see the readme.txt for resolve the error. Those errors won't affect the generating of birt.api jar )

3. In configuration dialog of "Java Application", set lib folder as the parameter. For example: "C:\Documents and Settings\Farrah\Desktop\WebViewerExample\WEB-INF\lib"

4. Press "Run". All packages of jars under lib will be output in the Console view.

5. Create the MAINFIEST.MF file that export all the packages got by step (4) and create the org.eclipse.birt.api jar that only contain this MANIFEST.MF

Q: How do I run BIRT JUnit Tests?

Q: How do I use BIRT Test Package to setup test framework?

The BIRT Test Package contains all the test plugins and the required resources. Integrating with Eclipse test framework, it’s easy to run the Junit test cases in batch. In this section, we will give out the instructions about usage of birt-test-suite package and how to run the automated JUnit test plugin.

1. Make sure JDK1.5 or above version is installed in the test environment. JAVA_HOME is pointing to the correct directory and $JAVA_HOME/bin has been added to system classpath.

2. Make sure ant is installed in the test environment. ANT_HOME is pointing to the correct directory and $ANT_HOME/bin has been added to system classpath

3. Unzip birt-report-all-in-one-<package.version>.zip

4. Unzip birt-test-suite-<package.version>.zip into the same folder as birt-report-all-in-one package

5. Unzip eclipse-test-framework-<package.version>.zip into the same folder as above.

6. If any duplicated plugins, please choose overwrite

Run Tests

Run All Tests on Windows

The top level ant script for start the whole JUnit tests is BirtRunner.xml, which can be found under the root folder of birt-test-suite.zip package. Please see the <target> “Start” in BirtRunner.xml to find out which tests will be called by bootstrap script.

Set three variables correctly in ant property file BirtRunner.properties:

1. test.home=<test directory, birt-test-suite.zip is unzipped to this folder>

2. jvm.15.home=< where the jvm 1.5 installed>

3. os=windows

4. test-output-dir=<test report output directory>

The bootstrap script for Windows OS is BirtRunner.bat. Double-click the BirtRunner.bat. Double-click the BirtRunner.bat to start the tests.

Run All Tests on Linux

The bootstrap script for Linux is BirtRunner.sh. Double-click the BirtRunner.sh,

Set three variables correctly in ant property file BirtRunner.properties:

1. test.home=<test directory, birt-test-suite.zip is unzipped to this folder>

2. jvm.15.home=< where the jvm 1.5 installed>

3. os=linux

4. test-output-dir=<test report output directory>

Start the test by command:

>./BirtRunner.sh start

Check Test Results

The output result files are in xml format. They can be found in folder ${test-output-dir}.

Run Single Test Plugin

If you like to run certain test plugin instead of all test plugins, follow below steps:

Q: How to upgrade to BIRT 2.3.2.2 based on Ganymede EPP reporting package?

Step 2: Switch to "Available Software" tab. If BIRT 2.3 update site is listed already, please jump to step 5 to continue. If it is not, click "Manage Sites..." button.

Step 3: Tick BIRT 2.3 update site to enable it. If you are not going to install other projects updates, you can un-tick the other update sites. This will reduce the time for searching feature updates in next steps.

Step 4: Press "OK". BIRT 2.3 update site is listed in the available softeware list.

Contribution

Q: How can I contribute to the BIRT Project?

BIRT is an open source project and seeks contributions in many areas:

Answer questions in the newsgroup. – As BIRT grows, new people will come to BIRT and ask questions that more experienced users have already answered. A great way to "give back" to the BIRT community is to answer such questions.

Try out new builds & features and report suggestions & problems. – BIRT uses an incremental development process: "release early and often." If you're adventerous, try out new builds & features and let us know about bugs, or ways to improve the product.

Platform, driver, app server and other integration issues. – The team tests BIRT on a set of plaforms identified in the Project Plan. If you work on a different platform, please try BIRT and report any problems that you find. File bugs using Bugzilla. Please be as specific as possible, since the development team does not have access to your platform.

Examples. – Examples help users quickly see what BIRT can do, show how to accomplish tasks, and help the development team visualize how BIRT is used in practice. You can contribute a static example (HTML output of a report), a report design, a code example and more. Please let us know on the newsgroup that you've got an example and we'll work with you to get it onto the web site.

Articles. – Articles can include how-to, tutorials, case studies, or brief notes about how to solve a particular problem, integrate with a particular bit of sofware and so on. Please let us know via the newsgroup and we'll work with you to get it onto the web site.

Bug fixes. – If you discover a problem or enhancement, and have the time & skills to track down the problem and find a fix; you can submit the fix to the development team as a Bugzilla entry.

Q: How can I help develop BIRT by contributing code?

Interested in joining the BIRT project as a code contributor? Maybe you found a bug and made a patch to the source code to address this, or perhaps you would like to make significant contribution in a specific area.

In brief, you have to earn the right to be Committer. This is done by submitting code patches, bug fixes, etc. or by making a significant contribution in some other way.

Q: Which codeline do I check out from CVS to create my patch?

Instructions about which codeline to use, and contributing to already released versions of BIRT are available on the Which Codeline page.

Futures

Q: How do I find out what the BIRT Project Team is working on next?

The development team publishes Development Plans for all upcoming releases to keep the community informed and provide a mechanism for feedback.

In addition, the Eclipse Bugzilla system is used to track all projects, big and small, that are being worked on for the BIRT project. You can query the Bugzilla system to find out what is assigned to any particular BIRT release.

Q: What other projects might fit within the BIRT project?

The BIRT Project has chosen to focus on reporting for the initial releases. Other possible projects could expand BIRT into many of the dimensions of Business Intelligence:

APIs and Frameworks to build business-user query tools for with flexible ad hoc access to data.

Analysis tools that enable power-users to slice-and-dice the same data.

Q: How does the BIRT project relate to TPTP, Data Tools, etc.

Eclipse is an active, growing community with new top-level projects being created at a lively pace. The BIRT PMC has an active dialog with these other projects to understand where BIRT can leverage existing or proposed functionality. With a community as dynamic as Eclipse, we adjust our plans to incorporate new functionality as the community evolves.