Beruflich Dokumente
Kultur Dokumente
Build and Deploy ........................................................................................................................................... 2 Install maven ............................................................................................................................................. 2 Download and unpack the Jasper Reports Server source code ................................................................ 2 Configuring the default_master.properties File ....................................................................................... 2 Mysql......................................................................................................................................................... 3 Refreshing your Buildomatic Settings ....................................................................................................... 4 Building JasperReports Server .................................................................................................................. 4 Eclipse Integration ........................................................................................................................................ 5 Build the jasper reports server ................................................................................................................. 5 Remove unnecessary files......................................................................................................................... 5 Create the jasperserver-repo project ....................................................................................................... 5 Create Jasper server project in eclipse ..................................................................................................... 6 Clear the build path for the Jasper Server Project .................................................................................... 6 Add jars to the Jasper Server Project ........................................................................................................ 6 Export jars to other projects ..................................................................................................................... 7 Remove the test packages from the build path........................................................................................ 7 You will need to down load some additional jars ..................................................................................... 8 You will still see some compilation errors ................................................................................................ 8 References .................................................................................................................................................... 8 http://www.jaspersoft.com/configuring-eclipse-tutorial#CE_Source ..................................................... 8 Jasper Server CP Source Build Guide.pdf .................................................................................................. 8
The JasperReports Server source code can be downloaded from the JasperForge.org downloads area: http://jasperforge.org. The source code package is a ZIP archive named jasperreports-server-cp-4.2.1src.zip. Unpack the jasperreports-server-cp-4.2.1-src.zip file to a directory location, such as C:\ or /home/<user>. The resulting location will be referred to as <js-src> Source Code Package Structure
Copy the appropriate file to the current directory and change its name at the same time: Windows: copy sample_conf\source-postgresql_master.properties
default_master.properties
Edit the new default_master.properties file and set the following properties to your local settings
Mysql
Download the JDBC driver, mysql-connector-java-5.1.18-bin.jar Place the MySQL driver in <js-src>/jasperserver/buildomatic/conf_source/db/mysql/jdbc Go to the buildomatic directory in the source distribution
cd <js-src>/jasperserver/buildomatic
Copy the appropriate file to the current directory and change its name at the same time: Windows: copy sample_conf\source\mysql_master.properties
default_master.properties
Edit the new default_master.properties file and set the following properties to your local settings:
Please note that js-pro-path should be set to nothing Example js-pro-path= This is to prevent the build from failing. This is not mentioned in the Jasperserver Build guide.
Eclipse Integration
Build the jasper reports server
Make sure that you build the jasper reports server with the steps above before you start integrating the code with eclipse
Click File > New > Project Expand the Java node, select Java Project, and click Next > o Project Name: jasperserver-repo o Uncheck Use Default Location and click the Browse button to navigate to the jasperserver-repo folder Click Finish Go to the Properties of this project and select java build path Go to the Order and Export tab, select all the jars , except the JRE
Click File > New > Project Expand the Java node, select Java Project, and click Next > o Project Name: jasperserver o Uncheck Use Default Location and click the Browse button to navigate to the jasperserver folder o Click Next > Click the Allow output folders for source folders and add the following location to the text field below o jasperserver/eclipse-build-classes Click Finish A prompt will notify you that the output folder has changed. Click Yes to remove the old generated class files
Right-click on the Project and select Build Path > Configure Build Path In the Project tab, click Add Click the checkbox next to jasperserver-repo and click OK In the Libraries tab, select all the jar files and click the Remove button o Ensure you have NOT selected the JRE Keep this window open
Click the Add Library button Select the JUnit option and click Next >
Ensure JUnit 4 is selected in the JUnit Library version combo box and click Finish Click the Add Library button again Ensure the User Library option is selected in the list and click Next > Click the User Libraries button Click the New button In the User library name: text box, enter JasperReports-Server-x.x.x (where x.x.x is the version number) and click OK Ensure the new library is selected and click the Add JARs button Browse to the folder which contains the JasperReports Server pro libraries: o (Windows) C:\js-workspace\jasperreports-server-vx.x.x-src\jasperserverpro\jasperserver-war\target\jasperserver-pro\WEB-INF\lib o (Linux) /opt/js-workspace/jasperreports-server-vx.x.x-src/jasperserverpro/jasperserver-war/target/jasperserver-pro/WEB-INF/lib Select all of the jar files in the folder and click Open Click the OK and Finish buttons to close the libraries dialog boxes Click the Add External JARs button o Browse to the lib folder of your Tomcat server:C:\path\to\tomcat\lib Select the jsp-api.jar and servlet-api.jar files and click Open Keep this window open
Click the Order and Export tab Click the Select All button Uncheck the JRE System Library entry, but ensure all others are checked Click OK to close the Properties dialog box
In the Project Explorer, hold down the CTRL key and select the following folders: o buildomatic/src/main/java o jasperserver-api-impl/engine/src/test/java o jasperserver-api-impl/metadata/src/test/java o jasperserver-remote-tests/src/test/java o jasperserver-unit-test/src/test/java o jasperserver-war-jar/src/test/java o jasperserver-war/src/test/java o production-tests/src/test/java Right-click on the selected packages and select Build Path > Remove from Build Path Expand the jasperserver-war-jar/src/main/java folder Expand the com.jaspersoft.jasperserver.war.tiles2 package Right-click on the SpringTilesConfigurer.java class and select Build Path > Exclude
References
http://www.jaspersoft.com/configuring-eclipse-tutorial#CE_Source Jasper Server CP Source Build Guide.pdf