This template is a Gradle project model for installing server parts of an Adelia application on an AS/400.
This build requires the Adelia objects in this application to be grouped in the form of artifacts generated by an Adelia build project.
The template does not support the installation of Adelia server AS/400 runtime.
Creating an AS/400 server installation project
The project is created by unzipping the %ADELIWS%\Build\templates\AS400 server installation.zip file: the obtained AS400 server installation directory can be moved and renamed as required.
The installation machine and Adelia build machine may be two different machines. Similarly, the AS/400 used for the Adelia build and the AS/400 used for installation may be different. ↑ Top of page
Configuring an AS/400 server installation project
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 settings
instalLibrary (mandatory)
Alphanumeric string representing the name of the library in which the AS/400 server objects will be placed. This library will be created if it does not exist.
buildSavlib (mandatory)
Alphanumeric string representing the name of the library used to save objects by the Adelia build.
Currently, objects are always saved in HA2SBUILD.
as400Host (mandatory)
Alphanumeric string representing the host name or IP address of the AS/400 where the objects will be installed.
as400User (mandatory)
Alphanumeric string representing the AS/400 user profile name which will be used for the SSH connection to AS/400.
publicKeyAuthentication (mandatory)
- "Y" (for "yes") if we wish to use public key authentication for the SSH connection to avoid having to specify an unencrypted password. Click here for more details.
- "N" (for "no") if we wish to establish the SSH connection with the AS/400 user profile password.
as400Password (optional)
Alphanumeric string representing the AS/400 user profile password which will be used for the SSH connection to AS/400.
This value is mandatory if you have specified "N" for the publicKeyAuthentication setting. ↑ Top of page
Repository manager settings
Artifact repositories are used during the following phase when executing an AS/400 server installation build:
- In the phase involving deploying your server objects on the AS/400, the build uses a repository to download (download repository) the artifacts required to retrieve objects.
These artifacts are your own Adelia object artifacts comprising the AS/400 server objects of your application. These result from the execution of an Adelia build project.
downloadArtifactsReleaseRepo (optional)
Access URL to the download repository for dependent artifacts necessary to the build.
This repository should make it possible to access your own Adelia object artifacts comprising your application. These artifacts are in release version if you have built your application in release version.
downloadArtifactsReleaseRepo.username / downloadArtifactsReleaseRepo.password (optional)
Defines the user profile and password used to connect to the download repository.
As we 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 your own Adelia object artifacts comprising your application. These artifacts are in snapshot version if you have built your own application in snapshot version.
downloadArtifactsSnapshotRepo.username / downloadArtifactsSnapshotRepo.password (optional)
Defines the 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 we access this repository in read only mode, Nexus authorizes an anonymous connection. In this case, leave the "username" and "password" fields blank. ↑ Top of page
Configuring the components of the AS/400 server application to install
These components are the Adelia object artifacts generated by the execution of an Adelia build project.
They need to be declared in the project in order to be deployed on AS/400.
To do this:
- Open the build.gradle file with a text editor, then
- In the "dependencies" section ("AS400 server artifact declaration"), declare your artifacts.
as400server-type artifacts
These artifacts must be declared by inserting the following instruction:
as400savf '<artifact group name>:<artifact file name without version>: <artifact version number> '
Example of declaration of artifact generated by an application area-based build:
For the as400server-type artifact whose file name is myapp-_app_area_1_as400server-1.1.0-SNAPSHOT.zip, enter as400savf 'my.company:myapp-_app_area_1_as400server :1.1.0-SNAPSHOT '.
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 artifact generated by a component-based build:
For the as400server-type artifact whose file name is prefix_compo_1_as400server-1.1.0-SNAPSHOT.zip, enter as4000savf 'my.company:prefix_compo_1_as400server:'1.1.0-SNAPSHOT '.
The group value is that of the "groupId" setting of the component which generates the artifact.
Executing an AS/400 server installation project
This template uses an SSH connection to transfer objects to AS/400 so you should first start up the SSHD server of your AS/400 (see AS/400 command: STRTCPSVR SERVER(*SSHD) ).
List of Gradle tasks of AS/400 server installation build
deploy
Installation task (deployment) of the AS/400 server objects in a library of the AS/400. ↑ Top of page