Jump to content
  • This documentation is an older version of JasperReports Server Community Project Source Build Guide. View the latest documentation.

     

    note-icon-ns_28x28.png.619ed4a142824f774297095222e6a754.png

    This document describes how to build from a command line shell in 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. You'll find these scripts 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 JasperReports Server from the Jaspersoft community site (http://community.jaspersoft.com):

    The download package is TIB_js-jrs-cp_8.0.0_src.zip

    Unpacking the Source Archive

    Unpack the TIB_js-jrs-cp_8.0.0_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-cp-8.0.0-src

    Linux:

    <js-src> example is /home/<user>/JasperReports-Server-cp-8.0.0-src

     

    note-icon-ns.png.70a746d6e90724b4ea3a8628aeefe146.png

    The source build may use paths which exceed the 260-character limit on Windows. To extract the package, Enable NTFS long paths (Windows 10 only) or use a third-party file archiver such as 7-Zip.

    Source Code Package Structure

    After you've unpacked 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-repo

    Dependent jar files (not readily available publicly)

    <js-src>/jasperserver-ui JasperReports Server source code for UI

    Check Apache Ant

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

    cd <js-src>/jasperserver/buildomatic

    js-ant help   or

    ./js-ant help (Linux)

    If you don't use the bundled version of Apache Ant, we recommend version 1.9.4 or later. Versions earlier than 1.8.1 are not compatible.

    Configuring the Buildomatic Properties

    The buildomatic scripts are found at the following location:

    <js-src>/jasperserver/buildomatic

    Use the buildomatic scripts to build the source code and configure settings for a supported application server and database. The file for configuring these settings is default_master.properties. The source distribution includes a properties file for each type of database. You'll add your specific settings to this file and rename it to:

    default_master.properties

    note-icon-ns_28x28.png.674fa65538b2f72795044d48381821e3.png

    When specifying paths with Apache Ant and Java in 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=tomcat [jboss-eap-7, wildfly, skipAppServerCheck][/code]                    

    appServerDir

    appServerDir = C:Program FilesApache Software FoundationTomcat 9.0[/code]
    appServerDir = /home/<user>/apache-tomcat-9.0[/code]                    

    dbHost

    dbUsername

    dbPassword

    maven

    maven = C:apache-maven-3.8.1binmvn.cmd[/code]
    maven = /home/<user>/apache-maven-3.8.1/bin/mvn[/code]                    

    js-path

    js-path = C:JasperReports-Server-cp-8.0.0-srcjasperserver[/code]                    

    js-pro-path

    js-pro-path =[/code]                        

    (Path must be declared, but doesn't require a value.)

    repo-path

    repo-path = C:JasperReports-Server-cp-8.0.0jasperserver-repo[/code]
    repo-path = /home/<user>/JasperReports-Server-cp-8.0.0-src/jasperserver-repo[/code]                    
    chrome.path
    chrome.path = C:/Program Files (x86)/Google/Chrome/Application/chrome.exe[/code]
    chrome.path = /usr/bin/google-chrome[/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

    appServerType=tomcat [jboss-eap-7, wildfly, skipAppServerCheck][/code]                    

    appServerDir

    appServerDir = C:Program FilesApache Software FoundationTomcat 9.0[/code]
    appServerDir = /home/<user>/apache-tomcat-9.0[/code]                    

    dbHost

    dbUsername

    dbPassword

    maven
    maven = C:apache-maven-3.8.1binmvn.cmd[/code]
    maven = /home/<user>/apache-3.8.1/bin/mvn[/code]                    

    js-path

    js-path = C:JasperReports-Server-cp-8.0.0-srcjasperserver[/code]
    js-path = /home/<user>/JasperReports-Server-cp-8.0.0-src/jasperserver[/code]                    

    js-pro-path

    js-pro-path = C:JasperReports-Server-cp-8.0.0-srcjasperserver-pro[/code]                    

    repo-path

    repo-path = C:JasperReports-Server-cp-8.0.0-srcjasperserver-repo[/code]
    repo-path = /home/<user>/JasperReports-Server-cp-8.0.0-src/jasperserver-repo[/code]                    
    chrome.path
    chrome.path = C:/Program Files (x86)/Google/Chrome/Application/chrome.exe[/code]
    chrome.path = /usr/bin/google-chrome[/code]                    

    Build Source Code

    Now that you've set up your default_master.properties file, you can build the source code.

    To build JasperReports Server:

    1. Set up the default_master.properties file for your environment (as described above).
    2. Start the database server.
    3. Stop the application server.
    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

    (Optional) Used for loading the databases

    js-ant build-ce

    Builds the community source code

    js-ant create-load-js-db-ce

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

    js-ant deploy-webapp-ce

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

    note-icon-ns_28x28.png.4f7411c95ef8d8c0ea97b44f728514c9.png

    Installing JasperReports Server automatically generates encryption keys that reside on the file system. These keys are stored in a dedicated TIBCO Jaspersoft keystore. Make sure this keystore is properly secured and backed up, as described in the TIBCO JasperReports Server Security Guide.

    Set Java Options

    JasperReports Server needs Java memory options that are larger than the standard defaults. For information about additional Java options, see please see Setting Java JVM Options.

    Set Increased JAVA_OPTS Settings

    JasperReports Server needs greater heap settings 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 Community Project Installation Guide. The following shows the minimum recommended settings; you may need to increase these according to your usage.

    JVM Options on Linux and Mac OSX (64 bit)

    Options for all app servers

    export JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx4096m -Xss2m"

    JVM Options on Windows (64 bit)

    Options for all app servers

    set JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx4096m -Xss2m

    You should add these settings to your application server startup script:

    Apache Tomcat:

    <tomcat>/bin/setclasspath.sh

    (.bat for Windows)

    JBoss:

    <jboss>/bin/standalone.conf

    (.bat for Windows)

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

    Starting JasperReports Server

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

    Logging into JasperReports Server

    You can now log into JasperReports Server through a web browser:

    Enter the login URL with the default port number:

    http://localhost:8080/jasperserver

    Log into JasperReports Server as jasperadmin:

    User ID: jasperadmin   Password: jasperadmin

    If you're unable to log in or have other problems, refer to Troubleshooting, or the JasperReports Server Community Project 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 you'll find the log file here:

    <tomcat>/logs/catalina.out

    Also check the jasperserver.log file. You can increase the debug output level by editing the log4j.properties file.

    The JasperReports Server runtime log is here:

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

    The log4j.properties file is here:

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

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...