Jump to content
We've recently updated our Privacy Statement, available here ×
  • This documentation is an older version of JasperReports Server Source Build Guide. View the latest documentation.

     

    note-icon-ns_28x28.png.deaec04e3f80a0499519660e3510ee41.png

    This document describes how to build from a command line shell under Linux or Windows. It does not address the process of building within an IDE (Integrated Development Environment) such as Eclipse or IntelliJ.

    Introduction to Buildomatic Source Build Scripts

    The JasperReports Server source code comes with a set of configuration and build scripts based on Apache Ant known as the buildomatic scripts. These scripts are found in the following directory:

    <js-src>/jasperserver/buildomatic

    The buildomatic scripts automate most aspects of configuring, building, and deploying the source code. Apache Ant is bundled into the source code distribution to simplify the setup.

    Downloading and Unpacking JasperReports Server Source Code

    Downloading the Source Archive

    Download the source code package zip for the commercial version of JasperReports Server from the Jaspersoft technical support site. The download package is jasperreports-server-5.6.1-src.zip and it can be downloaded here:

    http://www.jaspersoft.com/support_login.php

    For access to the site, contact technical support or your sales representative.

    Unpacking the Source Archive

    Unpack the jasperreports-server-5.6.1-src.zip file to a directory location, such as C: or /home/<user>. The resulting location is referred to as <js-src> in this document.

    Windows:

    <js-src> example is C:jasperreports-server-5.6.1-src

    Linux:

    <js-src> example is /home/<user>/jasperreports-server-5.6.1-src

    Source Code Package Structure

    After unpacking the zip file, the folder directory has the following structure:

    Directory or file

    Description

    <js-src>/apache-ant

    Bundled version of Apache Ant build tool

    <js-src>/jasperserver

    JasperReports Server open source code for core functionality

    <js-src>/jasperserver-pro

    JasperReports Server source code for commercial functionality

    <js-src>/jasperserver-repo

    Dependent jar files (not readily available publicly)

    <js-src>/jasperserver.license

    Evaluation license used with the jasperserver-pro war in your application server

    Check Apache Ant

    The Apache Ant tool is bundled (pre-integrated) into the source code distribution package so you do not need to download or install Ant in order to run the buildomatic scripts. For example:

    cd <js-src>/jasperserver/buildomatic

    js-ant help   or

    ./js-ant help (Linux)

    Configuring the Buildomatic Properties

    The buildomatic scripts are found at the following location:

    <js-src>/jasperserver/buildomatic

    The buildomatic scripts are used to build the source code and to configure settings for all supported application servers and databases. The file for configuring these settings is default_master.properties. The source distribution includes a properties file that is specific to each type of database. You will add your specific settings to this file and rename it to:

    default_master.properties

    note-icon-ns_28x28.png.3421e188c87bba3e2136197861a17578.png

    When specifying paths with Apache Ant and Java under Windows, a single forward slash (/) normally works the same as “escaped” double backlashes ().

    PostgreSQL

    1. Go to the buildomatic directory in the source distribution:

    cd <js-src>/jasperserver/buildomatic

    2. Copy the PostgreSQL specific file to the current directory and change its name to
    default_master.properties as shown below:

    Windows:

    copy sample_confpostgresql_master.properties default_master.properties[/code]                    

    Linux:

    cp sample_conf/postgresql_master.properties default_master.properties[/code]                    
    3. Edit the new default_master.properties file and set the following properties for your local environment:

    Property

    Examples

    appServerType

    appServerType=tomcat7 (or tomcat5/6, jboss/-as-7, glassfish2/3, skipAppServerCheck)[/code]                    

    appServerDir

    dbHost

    dbUsername

    dbPassword

    maven maven = C:apache-maven-3.0.4binmvn.bat

     

    maven = /home/devuser/apache-maven-3.0.4/bin/mvn

    js-path

    js-pro-path

    maven.build.type

    maven.build.type=repo

    repo-path

    repo-path = C:jasperreports-server-5.6.1-srcjasperserver-repo[/code]
    repo-path = /home/<user>/jasperreports-server-5.6.1-src/jasperserver-repo[/code]                    

    MySQL

    1. Go to the buildomatic directory in the source distribution:

    cd <js-src>/jasperserver/buildomatic

    2. Copy the MySQL specific file to the current directory and change its name to
    default_master.properties:

    Windows:

    copy sample_confmysql_master.properties default_master.properties

    Linux:

    cp sample_conf/mysql_master.properties default_master.properties

    3. Edit the new default_master.properties file and set the following properties to your local environment:

    Property

    Examples

    appServerType

    appServerDir

    dbHost

    dbUsername

    dbPassword

    maven maven = C:apache-maven-3.0.4binmvn.bat

     

    maven = /home/devuser/apache-maven-3.0.4/bin/mvn

    js-path

    js-pro-path

    maven.build.type

    maven.build.type=repo

    repo-path

    repo-path = C:jasperreports-server-5.6.1-srcjasperserver-repo[/code]
    repo-path = /home/<user>/jasperreports-server-5.6.1-src/jasperserver-repo[/code]                    

    Additional Databases

    For default_master.properties configurations for other databases, please see Source Build Setup for Other Databases.

    Build Source Code

    Now that your default_master.properties file has been setup, you can build the source code.

    To build JasperReports Server:

    1. Setup the default_master.properties file for your environment (as described above).
    2. Start the database server.
    3. Stop the application server unless it’s GlassFish, which should be running.
    4. Run the commands shown below:

    After executing each Ant target in “Commands for Building JasperReports Server”, look for the message BUILD SUCCESSFUL.

    Commands for Building JasperReports Server

    Commands

    Description

    cd <js-src>/jasperserver/buildomatic

     

    js-ant clean-config

    (Optional) Clears the buildomatic/build_conf/default directory.

    js-ant gen-config (Optional) Rebuilds the buildomatic/build_conf/default directory. js-ant add-jdbc-driver

    Used for loading the databases

    js-ant build-ce

    Builds the community source code

    js-ant build-pro

    Builds the commercial source code

    js-ant create-load-js-db-pro

    (Optional) Creates and loads the jasperserver database, imports core bootstrap data

    js-ant deploy-webapp-pro

    (Optional) Deploys the jasperserver-pro war file to the application server

    Set Java Options and jasperserver License

    JasperReports Server needs Java memory options that are larger than the standard defaults. Additionally, a jasperserver.license is required to execute at runtime.

    Set Increased JAVA_OPTS Settings

    JasperReports Server needs greater heap and permgen memory settings in order for all functionality to operate. For testing your deployed JasperServer you should set your JAVA_OPTS to the same default values described in the JasperReports Server Installation Guide. For a 64-bit system the settings would be similar to the following:

    Linux:

              export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m"[/code]        

    Windows:

              set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m [/code]        

    These settings should be added to your application server startup script:

    Apache Tomcat:

    <tomcat>/bin/setclasspath.sh

    (.bat for Windows)

    JBoss:

    <jboss>/bin/run.sh

    (.bat for Windows)

    For details on setting Java memory options, please see Setting Java JVM Options.

    Put jasperserver.license in Place

    JasperReports Server Commercial edition requires a license to run. A 30 day evaluation license is provided in the source code zip download package. You can use this evaluation license to get started and then replace it with one you request from Jaspersoft technical support or from your sales representative.

    JasperReports Server looks for the license file in the home directory of the user that runs the application server so you will need to copy the license to that location. The license is found in the root of the source package:

    <js-src>/jasperserver.license

    For additional information on license configuration, please see Configuring the JasperReports Server License File.

    Copy jasperserver.license to the appropriate folder listed the table below.

     

    License Locations

    Operating System

     

    Linux

    /home/<user>/

    Mac OSX

    /Users/<user>/

    Windows 7 using the bundled Tomcat

    C:Users<user>

    Windows 7 using an existing Tomcat Windows service

    C:

    Windows XP

    C:Documents and Settings<user>

    Windows 2003

    C:Documents and Settings<user>

    Windows 2008

    C:Documents and Settings<user>

    Starting JasperReports Server

    You can now start your application server or restart GlassFish. Your database should already be running.

    Logging into JasperReports Server

    You can now login to JasperReports Server through a web browser:

    Enter the login URL with the default port number:

    http://localhost:8080/jasperserver-pro

    Log into JasperReports Server as superuser or jasperadmin:

    User ID: superuser    Password: superuser

    User ID: jasperadmin   Password: jasperadmin

    If you are unable to login or have other problems, refer to Troubleshooting, or refer to the JasperReports Server Installation Guide, which provides additional troubleshooting information.

    JasperReports Server Log Files

    If you encounter any startup or runtime errors you can check the application server log files. For Apache Tomcat the log file will be found here:

    <tomcat>/logs/catalina.out

    There is also a jasperserver.log file. The debug output level can be increased by editing the log4j.properties file.

    The JasperReports Server runtime log is here:

    <tomcat>/webapps/jasperserver-pro/WEB-INF/logs/jasperserver.log

    The log4j.properties file is here:

    <tomcat>/webapps/jasperserver-pro/WEB-INF/log4j.properties

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...