OpenJRS Server is an independent community fork of JasperReports Server CE. The instructions below document the inherited build system and retain its original internal paths and identifiers. See project status, independence and AI-assisted maintenance before deploying.
- Install Java 1.8 or higher. Open JDK 1.8 or higher is supported too.
- Install Apache Ant. Recommended version 1.10.2 or later.
- Install Ant Contrib library (version 1.0b3).
- Install Maven build tool.
- Install Tomcat, JBoss EAP or Wildfly application server.
- Install PostgreSQL or MySQL database (Community Edition versions are enough)
First you need to build UI and Deploy (described in the section below) it to the local maven repository.
To start you should set up UI build environment as described in ../jasperserver-ui/ce/README.md#set-up including yarn install command.
To build UI artifacts run the following commands:
in ../jasperserver-ui/ce folder:
yarn run clean
yarn run buildin ../jasperserver-ui/ce/jrs-ui folder:
yarn run overlayBackend build process expects frontend distribution to be deployed to the maven repository.
So before starting backend build we can publish our frontend distribution to the local maven repository, so backend build will pick it up.
In order to do this
- set
BUILD_ARTIFACT_VERSION_NAME=masterenv variable. It should be configured in ../jasperserver-ui/ce/jrs-ui/.env.local file (you need to create this file) to override default parameters defined in ../jasperserver-ui/ce/jrs-ui/.env file. For more information see Parametrization.
You can set this variable to any other value, but you will need additionally to configure the server to use it instead. Otherwise it will not be able to find UI artifacts
- navigate to your jrs-ui folder ../jasperserver-ui/ce/jrs-ui
- run
yarn run mvnPublish
This command will publish UI artifacts to <path-to-maven-repo>/.m2/repository/com/jaspersoft/jrs-ui/master maven repo path.
By default, artifacts have the same name as a git branch, in our case it is master.
- In order to build the project you need to provide a configuration file with all required settings.
- Navigate to
<path-to-project>/jasperreports-server-ce/jasperserver/buildomatic/sample_conf/sourcedirectory. - Copy
postgresql_master.propertiesormysql_master.propertiesto thebuildomaticroot folder and rename a file todefault_master.propeties. - Open
default_master.propertiesand configure next required properties:js-path- path to downloaded JasperReports CE Server;appServerType- type of app server to use, tomcat is the default value;appServerDir- path to an app server;maven- path to a maven executable file;dbType,dbHost,dbUsername,dbPassword- database type, host, username and password related properties;maven.build.type- set it tocommunityvalue. Build uses this property to check what maven settings should be used.fafBuildArtifactVersionName- set it tomaster. This property checks what UI artifact to use. If you have specified a different value for theBUILD_ARTIFACT_VERSION_NAMEenv variable - you should use it.buildArtifactVersionName- set it tomaster. The value of this property should be the same as the value forfafBuildArtifactVersionName.
Configuration example:
js-path=/opt/jasperreports-server-ce/jasperserver
appServerType=tomcat
appServerDir=/opt/tomcat
maven=/opt/maven/bin/mvn
maven.build.type=community
dbType=postgresql
dbHost=localhost
dbUsername=postgres
dbPassword=password
fafBuildArtifactVersionName=master
buildArtifactVersionName=masterRun following commands in buildomatic folder:
Linux/MacOS:
./js-ant build-all-ce
./js-ant run-production-data-ce
./js-ant prepare-foodmart-db
./js-ant prepare-sugarcrm-db
./js-ant deploy-webapp-ceWindows:
js-ant.bat build-all-ce
js-ant.bat run-production-data-ce
js-ant.bat prepare-foodmart-db
js-ant.bat prepare-sugarcrm-db
js-ant.bat deploy-webapp-ceAfter successful build the JasperReports server will be deployed as a jasperserver WAR file to the specified Application Server (appServerDir location). In our case it will be /opt/tomcat/webapps/jasperserver
To start the inherited JasperReports Server runtime used by OpenJRS:
- For Tomcat execute
<path-to-tomcat>/bin/startup.sh(orstartup.batif you are on Windows) - For JBoss execute
<path-to-jboss>/bin/standalone.sh(orstandalone.batfor Windows) - Open Browser and navigate to
http://localhost:8080/jasperserver - Log into JasperReports Server as jasperadmin:
- User ID: jasperadmin
- Password: jasperadmin
There is no need to execute full-build commands all the time. The Buildomatic contains many simplified ant tasks, most common of them are:
build-ce- to build the server, this also executes all unit tests;run-integration-tests-ce- to run integration tests. To debug them add-Dremote.debug=trueto the command line and debugger attach to port 8000;deploy-webapp-ce- copies war file to the application server directory (specified by theappServerDirproperty);refresh-config- cleans and re-creates configuration files from scratch. Useful, when you made changes to thedefault_master.properties;help- displays help page. It contains information about other ant tasks that hasn't been listed here.
Please make sure you are using ./js-ant (or ./js-ant.bat for Windows) executable to run all these tasks, otherwise there might be an error message