Installing additional BIRT engine
-
Due to the number of libraries we would have to bundle to include BIRT reporting inside JBoss RS ,
we chose to offer BIRT reporting as a separate module .
The information provided on this page will allow you to install what is needed to deploy BIRT report designs in Jboss RS .
We distinguish two usage profiles :
- Simple "Runtime" Integration
- "Runtime" + Maven integration , in case you want to build and/or extend Jboss RS BIRT engine .
"Runtime" integration.
-
At the time of this writing , the latest available BIRT version is 2.2M1
Download engine-BIRT-xxx.sar , where xxx is the latest version number ( At the time of this writing , it is 0.2-SNAPSHOT )
Download the birt-runtime-2.2M1.zip package , available here ( http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/M-R1-2.2M1-200610171021/birt-runtime-2.2M1.zip )
Unpack it somewhere on your filesystem . We will now refer to the location where you unpacked the package as <BIRT_HOME>.
Note : the environment variable BIRT_HOME does not need to be set if you only plan to use BIRT for runtime purposes . However , if you wish to build it , it will need to be set for our repository installation script to work .
Copy <BIRT_HOME>/lib , <BIRT_HOME>/plugins and <BIRT_HOME>/configuration inside engine-BIRT-xxx.sar
deploy engine-BIRT-xxx.sar by placing in your Jboss instance 's deploy directory
Test that it is working by placing any valid BIRT report ( .rptdesign file ) in your Jboss instance 's deploy directory
You should see something resembling this in the JBoss console ,
or server.log file :
14:17:18,379 INFO [DeployerRPTDESIGN] init, Basic.rptdesign 14:17:18,379 INFO [DeployerRPTDESIGN] Watch file : file:/data/opt/jboss-4.0.4.GA/server/default/deploy/Basic.rptdesign 14:17:23,380 INFO [BirtReport] Compiling Report in :/data/opt/jboss-4.0.4.GA/server/default/tmp/jrs_birt1163337438380.rptdocument 14:17:26,018 INFO [BirtReport] Compilation successful :) 14:17:26,030 INFO [BirtReport] Report /data/opt/jboss-4.0.4.GA/server/default/tmp/jrs_birt1163337438380.rptdocument contained 1 page. 14:17:26,030 INFO [BirtReport] Cleanup... 14:17:26,030 INFO [BirtReport] Temp file /data/opt/jboss-4.0.4.GA/server/default/tmp/jrs_birt1163337438380.rptdocument deleted [OK]
You should now see the deployed report in the JBOSS RS reports console , available in /reports-console of your web server ( for example http://localhost:8080/reports-console )
Maven integration
-
In addition to the instructions provided on this page : Install and compile RS
You need to install the <BIRT_HOME>/lib libraries in your maven2 repository . To save you some time , we provide a script that will do
it for you .
For this script to work , you will need to set the BIRT_HOME environment variable to where you unpacked the birt-runtime-2.2M1.zip package :
On Linux machines :
export BIRT_HOME=/path/to/birt
On Windows : WinKey + Pause brings you "System Properties" . Click "Advanced" then "Environment variables" , and create a BIRT_HOME
variable ,
either under User variables or System Variables .
run the mvnbirt script below. It will install required jars in your repository . You can now compile the JBoss RS BIRT-engine .
Note : you do not need to be root to execute this script . This script is at the moment only provided in bash .
#!/bin/sh
BV=2.2M1 #Birt version
PK=jar #package type
if [ "x" = "x$BIRT_HOME" ]; then
echo "variable BIRT_HOME , containing lib/ and plugins/ must be set"
exit;
fi;
BASEDIR=$BIRT_HOME/ReportEngine/lib
BIRT_GROUP=org.eclipse.birt
EMF_GROUP=org.eclipse.emf.ecore
ACTUAL_DIR=`pwd`
cd $BASEDIR
##We Assume thar the 3 emf jars have the same version number , and take org.eclipse.emf.common for reference
EMFV=`ls org.eclipse.emf.common.jar | sed -e 's/\.jar$//' | sed -e 's/._//'`
##BIRT APIs
for i in `ls *api.jar | sed -e 's/\.jar$//'` ;
do mvn install:install-file -DgroupId=$BIRT_GROUP -DartifactId=$ -Dversion=$BV -Dpackaging=$PK -Dfile="$BASEDIR/$.$PK" -DgeneratePom=true ;
done;
##EMF ( Eclipse Modeling Framework ) . Assuming the 3 emf jars have the same version number!
for i in `ls org.eclipse.emf..jar | sed -e 's/\.jar$//' | sed -e 's/_.//'` ;
do mvn install:install-file -DgroupId=$ -DartifactId=$ -Dversion=$EMFV -Dpackaging=$PK -Dfile="$BASEDIR/$_$EMFV.$PK" -DgeneratePom=true ;
done;
Misc
mvn install:install-file -DgroupId=org.w3c -DartifactId=flute -Dversion=1.3 -Dpackaging=jar -Dfile="flute.$PK" -DgeneratePom=true
mvn install:install-file -DgroupId=org.w3c -DartifactId=sac -Dversion=1.3 -Dpackaging=jar -Dfile="sac.$PK" -DgeneratePom=true
mvn install:install-file -DgroupId=com.ibm -DartifactId=icu -Dversion=3.4.5 -Dpackaging=jar -Dfile="com.ibm.icu_3.4.5.$PK" -DgeneratePom=true
mvn install:install-file -DgroupId=com.lowagie -DartifactId=itext -Dversion=1.3 -Dpackaging=jar -Dfile="itext-1.3.$PK" -DgeneratePom=true
mvn install:install-file -DgroupId=org.mozilla.rhino -DartifactId=js -Dversion=1.6R1 -Dpackaging=jar -Dfile="js.$PK" -DgeneratePom=true
#
cd $ACTUAL_DIR
Comments