This template is a Gradle project model for building an Adelia Crystal Report Engine application in the form of a file in ZIP format.
This build can take into account Crystal Report .RPT files which are stored in a file system directory or present in the form of an artifact in Zip format generated by the execution of an application area-based or component-based Adelia build.
The project is created by decompressing the %ADELIWS%\Build\templates\acrpe application.zip file: the obtained "acrpe application" directory can be moved and renamed as required.
The Adelia ACRPE application build machine and Adelia build machine may be two different machines.
After creating a project, it needs to be configured before it can be executed. Build project configuration and initialization are based on the settings entered in the gradle.properties file, namely:
General settingsacrpeVersion (mandatory)Alphanumeric string representing the version number of the ACRPE runtime included in the built Adelia ACRPE application ZIP. version (mandatory)Alphanumeric string representing the application version number. Each artifact built will have the same version number. There are several version types:
group (mandatory)Alphanumeric string representing the identifier of the group or organization instigating the project. The value follows the same naming rules as Java packages (e.g. com.hardis) and we generally choose the name of the project's main package as a value. ACRPE application parametersacrpeAppName (optional)Alphanumeric string representing the name of the produced ZIP file. By default, the name of this file is <project directory name>-<version parameter value>.zip. If this parameter is entered, the file name will be <acrpeAppName parameter value>-<version parameter value>.zip. acrpe.port (optional)Application's TCP listening port number. This parameter is 3007 by default. acrpe.throttle.limitPerSecond (optional)Maximum number of incoming HTTP requests over a period of one second. By default, this parameter specifies no limit. acrpe.throttle.limitPerMinute (optional)Maximum number of incoming HTTP requests over a period of one minute. By default, this parameter specifies no limit. acrpe.throttle.limitPerHour (optional)Maximum number of incoming HTTP requests over a period of one hour. By default, this parameter specifies no limit. acrpe.throttle.limitPerDay (optional)Maximum number of incoming HTTP requests over a period of one day. By default, this parameter specifies no limit. acrpe.throttle.limitPerWeek (optional)Maximum number of incoming HTTP requests over a period of one week. By default, this parameter specifies no limit. rptFiles.defaultDir (optional)Default sub-directory for storing Crystal Report (.RPT) files stored in the file system and defined by a prtFiles-type Gradle dependency. The sub-directory is relative to the "acrpe" configuration sub-directory in the root of the built archive. This parameter has an alphanumeric value. This parameter is "rptFiles" by default. rptArtifacts.defaultDir (optional)Default sub-directory for storing CrystalReportsCloud or CrystalReportsWeb Adelia object artifacts (from an Adelia application area-based or component-based build) defined by an rptArtifacts Gradle dependency. The sub-directory is relative to the "acrpe" configuration sub-directory in the root of the built archive. This parameter has an alphanumeric value. This parameter is "rptZip" by default. acrpe.delegatePrinting (optional)Used to delegate printing to the hawrite64 utility. In this delegation mode, the report is first of all exported to a file in PDF format, then the latter is printed by the hawrite64 utility and its pdfium module. The "Y" value delegates printing and the "N" value does not delegate it. By default: "N". Repository manager settingsArtifact repositories are used during the following phases when executing an Adelia ACRPE build:
downloadArtifactsReleaseRepo (mandatory)Access URL to the download repository of the dependent artifacts needed for the build. This repository should make it possible to access:
By default, and by way of example only, the value of this parameter is the URL of the repository provided by Hardis. In its place, in your Nexus, you need to create your own private repository so the Hardis repository and your private repository are grouped together in the release version. Depending on your own Nexus configuration used for your Adelia build projects, it is either the repository created by default by Nexus and called "Releases", or another "hosted repository" with a "Repository policy" set to Release and created by ) you. To do this, after logging in to Nexus, in the "Repositories" view, add a new repository defined as a group of repositories described above:
To finish, replace the downloadArtifactsReleaseRepo parameter value with the "Repository Path" URL of the newly created group repository. downloadArtifactsReleaseRepo.username / downloadArtifactsReleaseRepo.password (optional)User profile and password used to connect to the download repository. By default, and by way of example, these identifiers are those of the Hardis download repository but they need to be replaced by those of your own group private repository (see downloadArtifactsReleaseRepo above). As you access this repository in read-only mode, Nexus authorizes an anonymous connection: in this case, leave the "username" and "password" fields blank. downloadArtifactsSnapshotRepo (optional)Access URL to the download repository of the dependent artifacts needed for the build. This repository should make it possible to access:
In your Nexus, you need to create your own private repository so the Hardis repository and your private repository are grouped together in the snapshot version. Depending on your own Nexus configuration used for your Adelia build projects, it is either the repository created by default by Nexus and called "Snapshots", or another "hosted repository" with a "Repository policy" set to Snapshot and created by ) you. To do this, after logging in to Nexus, in the "Repositories" view, add a new repository defined as a group of repositories described above:
To finish, replace the downloadArtifactsSnapshotRepo parameter value with the "Repository Path" URL of the newly created group repository. downloadArtifactsSnapshotRepo.username / downloadArtifactsSnapshotRepo.password (optional)User profile and password used to connect to the download repository. This profile should enable you to access your own private group repository (see downloadArtifactsSnapshotRepo above). As this repository is accessed in read-only mode, Nexus authorizes an anonymous connection: in this case, leave the "username" and "password" fields blank. uploadArchivesReleaseRepo (optional)Access URL to the upload repository used to store the ZIP artifact built with a release version. This repository enables the artifacts to be made available in the final version. uploadArchivesReleaseRepo.username / uploadArchivesReleaseRepo.password (optional)User profile and password used to connect to the artifact upload repository in the release version. uploadArchivesSnapshotRepo (optional)Access URL to the upload repository used to store the ZIP artifact built with a snapshot version. This repository enables the artifacts under development to be made available. uploadArchivesReleaseRepo.username / uploadArchivesReleaseRepo.password (optional)User profile and password used to connect to the artifact upload repository in the snapshot version. |
↑ Top of page |
These components are Adelia object artifacts generated by the execution of an Adelia build project, or Adelia objects resulting from an interactive generation.
They need to be declared in the Adelia ACRPE build project so they can be added to the produced ZIP.
To do this:
Open the build.gradle file with a text editor, then,
in the "dependencies" section (Declare your artifacts needed to build the ACRPE application here), declare your artifacts.
An artifact (CrystalReportsCloud or CrystalReportsWeb) is included in the "acrpe" configuration sub-directory of the produced archive (the default sub-directory is the rptArtifacts.defaultDir property value, or "rptZip" if it is not entered).
These artifacts must be declared by inserting the following instruction:
rptArtifacts group: '<artifact group name>', name: '<artifact file name without version>', version: '<artefact version number>', ext: 'zip'
A destination sub-directory of the declared artifacts can be forced by inserting the following instruction:
rptArtifacts (group: '<artifact group name>', name: '<artifact file name without version>', version: '<artefact version number>', ext: 'zip') {
ext.destinationDir = 'mySubDirForZip'
}
Example of declaration of artifact generated by an application area-based build:
For the CrystalReportsCloud-type artifact with the file name myapp-app_area_1_crystalreportscloud-1.1.0-SNAPSHOT.jar, enter rptArtifacts group:'my.company', name: 'myapp-app_area_1_crystalreportscloud', version: '1.1.0-SNAPSHOT', ext: 'zip'.
The group value is that of the "group" setting in the gradle.properties file of the Adelia build project which built the artifact.
Example of declaration of an artifact generated by a component-based build to the 'rptCloudEvent' sub-directory:
For the CrystalReportsCloudEvent-type artifact with the file name prefix_compo_1_crystalreportscloudevent-1.1.0-SNAPSHOT.jar, enter:
rptArtifacts (group:'my.company', name : 'prefix_compo_1_crystalreportscloudevent', version: '1.1.0-SNAPSHOT', ext: 'zip') {
ext.destinationDir = 'rptCloudEvent'
}
The group value is that of the "groupId" setting of the component which generates the artifact.
The sub-directories to search in the artifact's Zip file can be specified to the ACRPE. To do this, you need to declare the artifact by inserting the following instruction:
rptArtifacts (group: '<artifact group name>', name: '<artifact file name without version>', version: '<artefact version number>', ext: 'zip') {
ext.fromDirs = ['SearchRPTIntoZipfromThisSubDir1', 'SearchRPTIntoZipfromThisSubDir2/morePreciselyHere']
}
The "fromDirs" property contains the list of sub-directories to search.
To package the Adelia objects (.RPT files) resulting from interactive generation in the built archive, the following instruction needs to be inserted:
rptFiles fileTree('<Adelia objects generation path>')
The path can be absolute (e.g. 'C:/my/rpt/generation/directory') or relative in relation to the Gradle build project directory (e.g. './my/rpt/generation/subDirectory') .
All the objects contained in this directory (as well as the sub-directories) will be copied into the "acrpe" configuration sub-directory of the produced archive (the default sub-directory is the rptFiles.defaultDir property value, or "rptFiles" if it is not entered).
A destination sub-directory of the declared objects can be forced by inserting the following instruction:
rptFiles (fileTree('<Adelia objects generation path>')){
ext.destinationDir = 'mySubDirForRptFiles'
}
↑ Top of page |
By default, a number of configuration files are delivered with this template. These files are described in the following table:
File name | Path in built archive | Path in the Adelia AMBSS build project | Comment |
ACRPE.config | ZIP\acrpe\ACRPE.config | <ACRPE build project>\templates\ACRPE.config |
This configuration file is automatically produced when executing the Gradle build of the project from the gradle.properties file parameters (acrpe.port, acrpe.throttle.*) and declarations of rptFiles and rptArtifacts dependencies in the build.gradle file.
Application ZIP artifact build task. This is placed in the "build\distributions" sub-directory of the build project.
Task used to delete objects created when running the build task (the "build" and "acrpe" sub-directories are deleted).
This task transfers the built artifact (by calling the to the upload repository.
You must specify the uploadArchivesReleaseRepo or uploadArchivesSnapshotRepo key, depending on the artifact version type.
This task is used to transfer the built artifact to the machine's local Maven repository (%USERPROFILE%\.m2 repository).
The custom ZIP archive has the following structure:
The startup_x86.bat script for starting the ACRPE in console mode is automatically generated in the archive's "bin" sub-directory. It is used to start the ACRPE_console_x86.exe console application with the "-cfgdir" option, which points to the ACRPE.config configuration file in the "acrpe" sub-directory. This script starts without parameters.
The startup_x64.bat script for starting the ACRPE in console mode is automatically generated in the archive's "bin" sub-directory. It is used to start the ACRPE_console_x64.exe console application with the "-cfgdir" option, which points to the ACRPE.config configuration file in the "acrpe" sub-directory. This script starts without parameters.
↑ Top of page |