A collection of Gradle plugins and utilities that can be used to build CICS bundles, ready to be installed into CICS TS.
This project contains:
cics-bundle-gradle-plugin
, a Gradle plugin that builds CICS bundles, includes selected Java-based dependencies and deploys them to CICS.
The cics-bundle-gradle-plugin
supports building CICS bundles that contain the following bundleparts:
- EAR
- OSGi bundle
- WAR
- EBA
- EPADAPTER
- EPADAPTERSET
- EVENTBINDING
- FILE
- LIBRARY
- PACKAGESET
- POLICY
- PROGRAM
- TCPIPSERVICE
- TRANSACTION
- URIMAP
It can deploy CICS bundles containing any bundleparts.
The plugin requires Gradle version 5 features and will not work correctly on earlier releases of Gradle.
If you're using the deployCICSBundle
task, further configuration to CICS is required to make use of the CICS bundle deployment API (see the CICS TS doc for details). Simply put, you'll need:
- A CICS region that is at CICS® TS V5.6 open beta or later
- The region to be configured as a WUI region for the CICSplex that contains the deployment target region
- The WUI region to be configured to use the CMCI JVM server, including the CICS bundle deployment API
The cics-bundle-gradle-plugin
contributes the following gradle tasks.
This task uses the cicsBundle
dependency configuration to scope the EAR, WAR and OSGi java dependencies to be added to the CICS bundle. Other bundle parts are automatically added from the resources folder of your build.
Specify the default JVM server in the cicsBundle
block.
This task uses settings in the cicsBundle
block to deploy the CICS bundle to CICS on z/OS,
install and enable it.
To use the plugin, clone or download the GitHub repository. Then create a separate Gradle module for your CICS bundle and configure it as follows.
- Add the plugin id to your
build.gradle
.plugins { id 'com.ibm.cics.bundle' }
- Add the
mavenCentral
repository to yourbuild.gradle
, so Gradle can find the plugin.repositories { mavenCentral() }
Before building the CICS bundle module, you need to build the cloned plugin first, which provides necessary dependencies.
- In the CICS bundle module, add local and remote dependencies to the
cicsBundle
configuration in thedependencies
block, by prepending them with thecicsBundle
build configuration name that the plugin provides.dependencies { // A project within the build cicsBundle project(path: ':helloworldwar', configuration: 'war') // External dependencies, specify the repositories in the repositories block as usual cicsBundle(group: 'org.glassfish.main.admingui', name: 'war', version: '5.1.0', ext: 'war' ) cicsBundle(group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0', ext: 'jar') }
- Add the
cicsBundle
block to define the default JVM server.cicsBundle { defaultJVMServer = 'MYJVMS' }
- Define the version information for the bundle.
version '1.0.0-SNAPSHOT'
- Invoke the
buildCICSBundle
task in your build. It builds the CICS bundle with its contained modules.
-
In the CICS bundle module's
build.gradle
, add settings to thecicsBundle
block for the deploy destination.cicsBundle { cicsplex = 'MYPLEX' region = 'MYEGION' bunddef = 'MYDEF' csdgroup = 'MYGROUP' url = 'myserver.site.domain.com:1234' username = my_username // Define my_username in gradle.properties file password = my_password // Define my_password in gradle.properties file }
-
Invoke the
deployCICSBundle
task in your build to deploy the bundle to the target CICSplex and region.
We welcome contributions! Find out how in our contribution guide.
This project is licensed under the Eclipse Public License, Version 2.0.