Jaspersoft Studio Source Build

This document describes how to compile and run the Jaspersoft® Studio Professional edition from the source files. Version 9.0.0 is used as an example, but the details are also valid for newer versions.

Zip Package Contents

The zip package named js-jss_X.Y.Z_sources.zip contains the following items:

jrePackages folder: Contains zip files of the JRE version included Jaspersoft Studio (needed during build time).
sources folder: Contains the source code of the Jaspersoft Studio Professional version.
targetRepoE426 folder: Contains the target repository that can be used for both compiling in the Eclipse and building via Maven Tycho.
js-jss_9.0.0_license.txt folder: The current license file.

Setting Up Eclipse and Your Workspace

To set up Eclipse and Workspace:

1. Download the latest version of Eclipse from the website: http://www.eclipse.org/.
Normally, the Jaspersoft® developers use the Eclipse IDE for a RCP and RAP developers version of Eclipse. As of the time this document was created, the latest version is Eclipse 2023-06(4.28).
2. Choose a blank workspace when starting Eclipse instance.
3. Configure the proper Java Virtual Machine for compiling Jaspersoft Studio source code:
a. Select Eclipse > Preferences > Java > Installed JREs. Make sure that Java 11 and Java 8 are in the list of items. This is because the Jaspersoft Studio source code is still compatible with version 8, but the final product runs on 11. Therefore, it is better to have all of them set up properly (https://adoptium.net/download/).

Figure 1: Installed JREs configuration

b. Select Eclipse > Preferences > Java > Installed JREs > Execution Environment. Remember to select the best compatible JVM for each execution environment(Java 8 and 11).

Figure 2: Execution environment configuration

c. Select Eclipse > Preferences > Java > Compiler. Remember to change the compiler compliance level to 1.8.

Figure 3: Compiler configuration

4. Configure the proper target platform for compiling Jaspersoft Studio source code:
a. Select Eclipse > Preferences > Plug-in Development > Target Platform.
b. Add a new platform starting from the Nothing option, then add the targetRepoE426-9.0.0 directory containing the plug-ins and features that are the foundation for the Jaspersoft Studio platform.

Figure 4: Creating a target platform

c. Select the newly created platform to compile the sources.

Figure 5: Selecting the target platform

5. Import the existing projects from the sources folder:
a. Select File > Import.
b. Select Import (wizard) > General > Existing Projects into Workspace.

Figure 6: Importing projects

c. Configure the wizard to point to the location of the downloaded sources directory, then click Finish. It is recommended to copy the projects directly into the dedicated workspace to avoid modifying the original ones.

Once the import operation ends, you see the automatic build triggered. The projects org.osgi.framework.system.packages.extra and com.jaspersoft.studio.rcp.macosx (if not on Mac) could appear as broken. You can safely close them.

Setting Up Run/Debug Configuration of Jaspersoft Studio

To run/debug a version of the Jaspersoft Studio runtime from the development environment, you can create a run/debug configuration:

1. Select Run > Debug Configurations > Eclipse Application > New from the menu.
2. Enter the name and select com.jaspersoft.studio.pro.rcp.product for Run a product option.
3. Set the Execution environment to the Java 11 version.

Figure 7: Creating a debug configuration

4. Enter the required details for the product configuration in the Main tab.

You can add the additional arguments and configuration parameters in the Arguments tab. You can also replicate the actual final product configuration using the information in the jaspersoftstudiopro.product file. The following example is based on the 9.0.0 configuration:

-Xms128m
-Xmx2048m
-XX:+CMSClassUnloadingEnabled
-XX:+UseConcMarkSweepGC
-Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
-Ddeployment.security.TLSv1.1=true
-Ddeployment.security.TLSv1.2=true
-Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1
.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPFactory=com.sun.xml.messaging.saaj.
soap.ver1_1.SOAPFactory1_1Impl -Djavax.xml.soap.SAAJMetaFactory=com.sun.xml.messaging.saaj.
soap.SAAJMetaFactoryImpl -Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.messaging.saaj.client.p2p.
HttpSOAPConnectionFactory -XstartOnFirstThread -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
-Xms128m
-Xmx2048m
-XX:+CMSClassUnloadingEnabled
-XX:+UseConcMarkSweepGC
-Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
-Ddeployment.security.TLSv1.1=true
-Ddeployment.security.TLSv1.2=true
-Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
-Djavax.xml.soap.SOAPFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl
-Djavax.xml.soap.SAAJMetaFactory=com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl
-Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.messaging.saaj.client.p2p. HttpSOAPConnectionFactory
-XstartOnFirstThread
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true

Figure 8: Setting arguments

5. (Optional) On the Plug-ins tab, disable the option Validate Plug-ins automatically prior to launching to avoid the warning message related to the plug-ins/fragments/features related to multiple operating systems.
6. Click the Debug/Run button to launch the Jaspersoft Studio runtime.

Creating Products from Jaspersoft Studio Sources

To test a final product as it looks after export, you can use Maven Tycho to build Jaspersoft Studio sources.

All the source projects must be in one single folder: for example, it could be the Eclipse workspace or copy the projects into a new dedicated folder.

To build the Jaspersoft Studio Professional project, you need to use the aggregator.pro project as a main location.
The JasperReports® IO package for Jaspersoft Studio Sources is needed to perform a correct successful build. For example, in the case of Jaspersoft Studio Professional 9.0.0, the correct version is 4.0.0: artifact jrio-standalone-4.0.0-jss.zip.
1. Make sure you have correctly installed Maven.
2. Set up Maven properly using any of these methods.

Method 1

a. Configure your Maven settings.xml file. You can start from the following sample settings.xml file:
<settings>
    <profiles>
        <profile>
            <id>JSSProfile</id>
            <repositories>
                <repository>
                  <id>central</id>
                  <name>jaspersoft-repo</name>
                  <url>https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-repo</url>
                </repository>
            </repositories>
            <properties>
                <!-- Local Repository with the target platform for building -->
                <targetplatform.repo>/tmp/js-jss_9.0.0_sources/targetRepoE426-9.0.0
                </targetplatform.repo>
                <!-- JRE files location -->
                <jre.packages.location>/tmp/js-jss_9.0.0_sources/jrePackages
                </jre.packages.location>
                <!-- JRIO package location -->
                <jrio.package.location>/tmp/jrio</jrio.package.location>   
                <!-- JRIO version -->
                <jrio.package.version>4.0.0</jrio.package.version>
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>JSSProfile</activeProfile>
    </activeProfiles>
</settings>
b. Inside the aggregator.pro project folder, enter the following command.
$ mvn clean package   

Or Method 2: Provide all the details with one single command, once in the aggregator.pro folder:

 mvn clean package \
-Dmaven.repo.remote=https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-repo \
-Dtargetplatform.repo=/tmp/js-jss_9.0.0_sources/targetRepoE426-9.0.0 \
-Djre.packages.location=/tmp/js-jss_9.0.0_sources/jrePackages \
-Djrio.package.location=/tmp/jrio \
-Djrio.package.version=4.0.0
3. When the build is completed, you can retrieve the product artifacts from the following location:
<FULLWORKSPACE_PATH>/com.jaspersoft.studio.pro.rcp.product/target/products/
com.jaspersoft.studio.pro.rcp.product/

FULLWORKSPACE_PATH is the location where all the sources are located including an Eclipse workspace folder.

4. To properly package the previously created raw artifacts, perform the following tasks.
a. Select the subfolder ant-scripts from aggregator.pro project as a current location.
b. Run the following command using ANT:
ant -buildfile packageRawDistributions.xml -Djre.packages.location=/tmp/js-jss_9.0.0_sources/jrePackages
c. In the project subfolder product/dist, you find the zipped artifacts ready to use.
Additional information

Please contact the Jaspersoft Studio team for any further information.