From aaff852c85668a8dd2c94900944302f28cdc4f10 Mon Sep 17 00:00:00 2001 From: Ivan Hargreaves Date: Thu, 2 Jul 2026 14:21:07 +0100 Subject: [PATCH 1/2] Publish readiness fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - build.yaml: add copyright job write permissions (contents: write, pull-requests: write at job level); fix build-gradle to run 'gradle' command (not './gradlew') so direct install and wrapper jobs are distinct; add gradle-version: 8.14.4 to setup-gradle; fix copyright checker directory to ./cics-java-liberty-springboot-link-app/; update base-copyright year to 2026; remove unnecessary daily schedule trigger - Add cleanup-old-runs.yaml workflow (weekly, 30-day retention, 6 min runs) - settings.gradle: add foojay toolchain resolver plugin for JDK auto-provisioning - gradle.properties: remove stale publish config block; add auto-detect/auto-download for toolchain; add configuration-cache comment - app/build.gradle: remove explicit io.spring.dependency-management version (managed by Spring Boot plugin); comment out tiles-el as opt-in for JSF - pom.xml: align Spring Boot to 3.5.16 (latest stable 3.5.x) - Root .classpath: replace with minimal parent form (no source entries) - Root .project: rename from com.ibm.cicsdev.springboot.link to repo name - Root .settings: add org.eclipse.core.resources.prefs (UTF-8); populate org.eclipse.jdt.core.prefs with full Java 17 compiler settings; fix facets to jst.web 6.0 / jst.java 17 - app .classpath: add CICS Library V6.1 entry - app .settings: create org.eclipse.core.resources.prefs and org.eclipse.jdt.core.prefs with Java 17 compiler settings - etc/config/liberty/server.xml: add Liberty feature template - MAINTAINERS.md: update last reviewed date to July 2026 - README.md: rewrite to standard Spring Boot template — add License badge, Overview with Key Features, Table of Contents; fix Prerequisites to V6.1 and Java 17; update BOM snippet to V6.1; rename sections to standard names; restructure deployment to three standard methods; add Additional Resources and Contributing sections --- .classpath | 18 +- .github/workflows/build.yaml | 22 +- .github/workflows/cleanup-old-runs.yaml | 20 ++ .project | 2 +- .settings/org.eclipse.core.resources.prefs | 2 + .settings/org.eclipse.jdt.core.prefs | 9 + ....eclipse.wst.common.project.facet.core.xml | 4 +- MAINTAINERS.md | 2 +- README.md | 197 +++++++++++------- .../.classpath | 5 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../build.gradle | 8 +- cics-java-liberty-springboot-link-app/pom.xml | 3 +- etc/config/liberty/server.xml | 11 + gradle.properties | 25 +-- pom.xml | 2 +- settings.gradle | 10 + 18 files changed, 223 insertions(+), 130 deletions(-) create mode 100644 .github/workflows/cleanup-old-runs.yaml create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 cics-java-liberty-springboot-link-app/.settings/org.eclipse.core.resources.prefs create mode 100644 cics-java-liberty-springboot-link-app/.settings/org.eclipse.jdt.core.prefs create mode 100644 etc/config/liberty/server.xml diff --git a/.classpath b/.classpath index 4c6c44b..03ac002 100644 --- a/.classpath +++ b/.classpath @@ -1,22 +1,8 @@ - + - - - - - - - - - - - - - - - + diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c5cfcb7..f01b2d6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,8 +5,6 @@ on: branches: ["main"] pull_request: branches: ["main"] - schedule: - - cron: '0 0 * * *' permissions: contents: read @@ -15,6 +13,9 @@ jobs: check-copyright: runs-on: ubuntu-latest name: Check Copyright + permissions: + contents: write + pull-requests: write steps: - uses: actions/checkout@v4 with: @@ -22,9 +23,9 @@ jobs: - id: copyright-action uses: cicsdev/.github/.github/actions/samples-copyright-checker@4134522d8109169bb8c460db841f94167ec2802f with: - directory: './cics-java-liberty-springboot-link/' + directory: './cics-java-liberty-springboot-link-app/' file-extensions: '*.java' - base-copyright: 'Copyright IBM Corp. 2025' + base-copyright: 'Copyright IBM Corp. 2026' token: ${{ secrets.GITHUB_TOKEN }} build-maven: @@ -65,7 +66,7 @@ jobs: build-gradle: name: Build Gradle - + runs-on: ubuntu-latest strategy: matrix: @@ -78,13 +79,16 @@ jobs: java-version: ${{ matrix.jdk }} distribution: 'semeru' - name: Setup Gradle + # Use setup-gradle to install a specific Gradle version for direct 'gradle' command use uses: gradle/actions/setup-gradle@v4 + with: + gradle-version: 8.14.4 - name: Build with Gradle - run: ./gradlew clean build -Pjava_version=${{ matrix.jdk }} - + run: gradle clean build -Pjava_version=${{ matrix.jdk }} + build-gradlew: name: Build Gradle wrapper - + runs-on: ubuntu-latest strategy: matrix: @@ -98,5 +102,3 @@ jobs: distribution: 'semeru' - name: Build with Gradle Wrapper run: ./gradlew clean build -Pjava_version=${{ matrix.jdk }} - - diff --git a/.github/workflows/cleanup-old-runs.yaml b/.github/workflows/cleanup-old-runs.yaml new file mode 100644 index 0000000..384754d --- /dev/null +++ b/.github/workflows/cleanup-old-runs.yaml @@ -0,0 +1,20 @@ +name: Cleanup old workflow runs + +on: + schedule: + - cron: '0 0 * * 0' # Run weekly on Sunday at midnight UTC + workflow_dispatch: # Allow manual triggering + +jobs: + cleanup: + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Delete old workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 30 + keep_minimum_runs: 6 diff --git a/.project b/.project index 3a54fab..60c9bf7 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - com.ibm.cicsdev.springboot.link + cics-java-liberty-springboot-link diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 0b3561a..2cfd37a 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,2 +1,11 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index cea524a..1bfcd9b 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -2,6 +2,6 @@ - - + + diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 27652f8..ad9ad7c 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -4,4 +4,4 @@ - Alex Brown [@AlexBrown](https://github.com/SoftlySplinter) - Phil Wakelin [@PhilWakelin](https://github.com/PhilWakelin) -*Last reviewed:* November 2024 +*Last reviewed:* July 2026 diff --git a/README.md b/README.md index 8c4c8c0..00fb597 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,88 @@ # cics-java-liberty-springboot-link [![Build](https://github.com/cicsdev/cics-java-liberty-springboot-link/actions/workflows/build.yaml/badge.svg)](https://github.com/cicsdev/cics-java-liberty-springboot-link/actions/workflows/build.yaml) +[![License](https://img.shields.io/badge/License-EPL%202.0-green.svg)](https://opensource.org/licenses/EPL-2.0) -This sample demonstrates how you can link to a Spring Boot application in a Liberty JVM server from a CICS program. The application is based on a Spring Boot sample application that demonstrates Spring MVC, so has both a web front-end and a CICS entry point using the link to Liberty `@CICSProgram` annotation. The sample shows how both entry points can access the same data. +## Overview + +This sample demonstrates how to link to a Spring Boot application running in a CICS Liberty JVM server from a CICS program. It is based on a Spring MVC application that provides both a web front-end and a CICS entry point using the Link to Liberty `@CICSProgram` annotation. The sample shows how both entry points can share the same application state. + +**Key Features:** +- Demonstrates the CICS Link to Liberty feature using the `@CICSProgram` annotation +- Provides a Spring MVC web front-end and a CICS-callable entry point in a single application +- Shows how CICS channels and containers can be used to pass data into a Spring Boot application +- Includes a companion COBOL driver program to invoke the application from a CICS terminal + +## Table of Contents + +1. [Overview](#overview) +2. [Prerequisites](#prerequisites) +3. [Downloading](#downloading) +4. [Check Dependencies](#check-dependencies) +5. [Building the Sample](#building-the-sample) +6. [Deploying to a CICS Liberty JVM server](#deploying-to-a-cics-liberty-jvm-server) +7. [Running the Sample](#running-the-sample) +8. [License](#license) +9. [Additional Resources](#additional-resources) +10. [Contributing](#contributing) ## Prerequisites - - CICS TS V5.5 with APAR PH14856, or later - - A configured Liberty JVM server in CICS - - Java SE 1.8 or later on the workstation - - An Eclipse development environment on the workstation (optional) - - Either Gradle or Apache Maven on the workstation (optional if using Wrappers) - +- CICS TS V6.1 or later +- A configured Liberty JVM server in CICS +- Java SE 17 or later on the workstation +- An Eclipse development environment on the workstation (optional) +- Either Gradle or Apache Maven on the workstation (optional if using Wrappers) ## Downloading -- Clone the repository using your IDEs support, such as the Eclipse Git plugin +- Clone the repository using your IDE's support, such as the Eclipse Git plugin - **or**, download the sample as a [ZIP](https://github.com/cicsdev/cics-java-liberty-springboot-link/archive/main.zip) and unzip onto the workstation >*Tip: Eclipse Git provides an 'Import existing Projects' check-box when cloning a repository.* - ### Check dependencies - -Before building this sample, you should verify that the correct CICS TS bill of materials (BOM) is specified for your target release of CICS. The BOM specifies a consistent set of artifacts, and adds information about their scope. In the example below the version specified is compatible with CICS TS V5.5 with JCICS APAR PH25409, or newer. That is, the Java byte codes built by compiling against this version of JCICS will be compatible with later CICS TS versions and subsequent JCICS APARs. -You can browse the published versions of the CICS BOM at [Maven Central.](https://mvnrepository.com/artifact/com.ibm.cics/com.ibm.cics.ts.bom) - -Gradle (build.gradle): -`compileOnly enforcedPlatform("com.ibm.cics:com.ibm.cics.ts.bom:5.5-20200519131930-PH25409")` +Before building this sample, you should verify that the correct CICS TS bill of materials (BOM) is specified for your target release of CICS. The BOM specifies a consistent set of artifacts and adds information about their scope. In the example below the version specified is compatible with CICS TS V6.1 with JCICS APAR PH63856, or newer. That is, the Java byte codes built by compiling against this version of JCICS will be compatible with later CICS TS versions and subsequent JCICS APARs. -Maven (POM.xml): +You can browse the published versions of the CICS BOM at [Maven Central](https://mvnrepository.com/artifact/com.ibm.cics/com.ibm.cics.ts.bom). -``` xml - - - - com.ibm.cics - com.ibm.cics.ts.bom - 5.5-20200519131930-PH25409 - pom - import - - - - ``` +Gradle (build.gradle): + +`compileOnly enforcedPlatform("com.ibm.cics:com.ibm.cics.ts.bom:6.1-20250812133513-PH63856")` + +Maven (pom.xml): +```xml + + + + com.ibm.cics + com.ibm.cics.ts.bom + 6.1-20250812133513-PH63856 + pom + import + + + +``` -## Building +## Building the Sample -You can build the sample using an IDE of your choice, or you can build it from the command line. For both approaches, using the supplied Gradle or Maven wrapper is the recommended way to get a consistent version of build tooling. +You can build the sample using an IDE of your choice, or you can build it from the command line. For both approaches, using the supplied Gradle or Maven wrapper is the recommended way to get a consistent version of build tooling. On the command line, you simply swap the Gradle or Maven command for the wrapper equivalent, `gradlew` or `mvnw` respectively. - + For an IDE, taking Eclipse as an example, the plug-ins for Gradle *buildship* and Maven *m2e* will integrate with the "Run As..." capability, allowing you to specify whether you want to build the project with a Wrapper, or a specific version of your chosen build tool. The required build-tasks are `clean build` for Gradle and `clean verify` for Maven. Once run, Gradle will generate a WAR file in the `cics-java-liberty-springboot-link-app/build/libs` directory, while Maven will generate it in the `cics-java-liberty-springboot-link-app/target` directory. -**Note:** -If the Liberty server uses the JSF feature then the application build should add a dependency for tiles-el. This is required because javax.el.ELResolver is eligible for injection as mandated by the JSF specification and failure to add this to the build will cause a `java.lang.NoClassDefFoundError` for `org.apache.tiles.el.ScopeELResolver` at application startup. - **Note:** When building a WAR file for deployment to Liberty it is good practice to exclude Tomcat from the final runtime artifact. We demonstrate this in the pom.xml with the *provided* scope, and in build.gradle with the *providedRuntime()* dependency. -#### Gradle Wrapper (command line) +**Note:** If the Liberty server uses the JSF feature then the application build should add a dependency for `tiles-el`. This is required because `javax.el.ELResolver` is eligible for injection as mandated by the JSF specification, and failure to add this to the build will cause a `java.lang.NoClassDefFoundError` for `org.apache.tiles.el.ScopeELResolver` at application startup. The dependency is commented out in both `build.gradle` and `pom.xml` — uncomment it if needed. + +**Note:** If you import the project to your IDE, you might experience local project compile errors. To resolve these errors you should run a tooling refresh on that project. For example, in Eclipse: right-click on "Project", select "Gradle → Refresh Gradle Project", **or** right-click on "Project", select "Maven → Update Project...". + +### Gradle Wrapper (command line) Run the following in a local command prompt: @@ -70,16 +91,14 @@ On Linux or Mac: ```shell ./gradlew clean build ``` + On Windows: ```shell gradlew.bat clean build ``` -This creates a WAR file inside the `build/libs` directory. - -#### Maven Wrapper (command line) - +### Maven Wrapper (command line) Run the following in a local command prompt: @@ -95,60 +114,82 @@ On Windows: mvnw.cmd clean verify ``` -This creates a WAR file inside the `target` directory. +## Deploying to a CICS Liberty JVM server +Ensure you have the following features defined in your Liberty `server.xml`: -## Deploying to a CICS Liberty JVM server +- `cicsts:link-1.0` +- `cicsts:security-1.0` if CICS security is enabled -- Ensure you have the following features defined in your Liberty `server.xml`: - - `cicsts:link-1.0` - - `cicsts:security-1.0` if CICS security is enabled - -- Deployment option 1: - - Copy and paste the built WAR from your *target* or *build/libs* directory into a Eclipse CICS bundle project and create a new WAR bundlepart that references the WAR file. Then deploy the CICS bundle project from CICS Explorer using the **Export Bundle Project to z/OS UNIX File System** wizard. - - -- Deployment option 2: - - Manually upload the WAR file to zFS and add an `` element to the Liberty server.xml to define the web application with access to all authenticated users. For example the following application element can be used to install a WAR, and grant access to all authenticated users if security is enabled. - -``` XML - +A template `server.xml` is provided [here](./etc/config/liberty/server.xml). + +### CICS Bundle Plugin Deployment (Gradle/Maven) + +This is the **recommended** deployment method as it uses the CICS bundle generated during the build process. + +1. Upload the CICS bundle ZIP file to zFS: + - Gradle: `cics-java-liberty-springboot-link-cicsbundle/build/distributions/` + - Maven: `cics-java-liberty-springboot-link-cicsbundle/target/` + +2. Unzip the bundle on zFS, then create and install a CICS BUNDLE resource definition pointing to the unzipped directory. + +### CICS Explorer SDK Deployment + +1. Copy and paste the built WAR from your `target` or `build/libs` directory into an Eclipse CICS Bundle project and create a new WAR bundlepart that references the WAR file. +2. Deploy the CICS Bundle project from CICS Explorer using the **Export Bundle Project to z/OS UNIX File System** wizard. + +### Direct Liberty Application Deployment + +1. Manually upload the WAR file to zFS. +2. Add an `` element to the Liberty `server.xml` to define the web application with access to all authenticated users: + +```xml + - - - + + + ``` -- Check for the dynamically created CICS PROGRAM resource YOSPRING for example by using the Programs view in CICS Explorer. - -## Trying out the sample +## Running the Sample 1. Ensure the web application started successfully in Liberty by checking for msg `CWWKT0016I` in the Liberty messages.log: - - - `A CWWKT0016I: Web application available (default_host): http://myzos.mycompany.com:httpPort/cics-java-liberty-springboot-link-0.1.0` - - `I SRVE0292I: Servlet Message - [cics-java-liberty-springboot.link-0.1.0]:.Initializing Spring embedded WebApplicationContext` -2. You can use the COBOL program provided in this repository to invoke the Spring Boot application. Compile [GOSPRING.cbl](cobol/GOSPRING.cbl) and put the load module in a suitable load library. Define and install a CICS transaction with GOSPRING as the initial program, and start it from a terminal. + `A CWWKT0016I: Web application available (default_host): http://myzos.mycompany.com:httpPort/cics-java-liberty-springboot-link-app-1.0.0` -Alternatively, you can use CECI to invoke the sample program: +2. Check for the dynamically created CICS PROGRAM resource `YOSPRING`, for example by using the Programs view in CICS Explorer. -``` -CECI PUT CONTAINER(MESSAGE) CHAR FROM(HELLO) CHANNEL(CHAN) -CECI LINK PROG(YOSPRING) CHANNEL(CHAN) -``` -Ensure you run both commands in the same CECI session. +3. Invoke the Spring Boot application from CICS. You can use the COBOL program provided in this repository — compile [GOSPRING.cbl](cobol/GOSPRING.cbl), put the load module in a suitable load library, define and install a CICS transaction with `GOSPRING` as the initial program, and start it from a terminal. -3. After invoking the Spring Boot applicaiton from CICS, you can view its web front end. Find the URL the application is published on in `messages.log` e.g. `http://myzos.mycompany.com:32000/cics-java-liberty-springboot-link-0.1.0/`. You should be able to see a message created by CICS! + Alternatively, use CECI: -## Examining the code + ``` + CECI PUT CONTAINER(MESSAGE) CHAR FROM(HELLO) CHANNEL(CHAN) + CECI LINK PROG(YOSPRING) CHANNEL(CHAN) + ``` -The CICS entry point for the application is in [CICSCallable.java](src/main/java/com/ibm/cicsdev/springboot/link/app/ui/cics/CICSCallable.java). This class is a Spring Bean, annotated with `@Component`. It has an autowired referenced to a `MessageRespository`, which the Spring Framework will inject. + Ensure you run both commands in the same CECI session. -`callMeFromCICS()` is the method that CICS will invoke when you perform an `EXEC CICS LINK PROGRAM(YOSPRING)`. This is specified by the `@CICSProgram` annotation. The code obtains the current channel and gets a container in order to obtain the data passed by the calling COBOL program. It then creates a message in the `MessageRespoitory`. +4. After invoking the application from CICS, view the web front-end at the URL shown in `messages.log`. You should see the message created by CICS. + +The CICS entry point for the application is in [CICSCallable.java](cics-java-liberty-springboot-link-app/src/main/java/com/ibm/cicsdev/springboot/link/app/ui/cics/CICSCallable.java). The `callMeFromCICS()` method is invoked when CICS executes `EXEC CICS LINK PROGRAM(YOSPRING)`, as specified by the `@CICSProgram` annotation. ## License -This project is licensed under [Eclipse Public License - v 2.0](LICENSE). + +This project is licensed under [Eclipse Public License - v 2.0](LICENSE). + +## Additional Resources + +- [CICS TS Documentation — Link to Liberty](https://www.ibm.com/docs/en/cics-ts/latest?topic=liberty-link-overview) +- [CICS TS Documentation](https://www.ibm.com/docs/en/cics-ts) +- [WebSphere Liberty Documentation](https://www.ibm.com/docs/en/was-liberty) +- [Spring Boot Documentation](https://spring.io/projects/spring-boot) +- [CICS Java samples on GitHub](https://github.com/cicsdev) + +## Contributing + +We welcome bug reports and feedback! Please see [CONTRIBUTING.md](https://github.com/cicsdev/.github/blob/main/CONTRIBUTING.md) for guidelines on reporting issues. diff --git a/cics-java-liberty-springboot-link-app/.classpath b/cics-java-liberty-springboot-link-app/.classpath index a0cd34f..f378532 100644 --- a/cics-java-liberty-springboot-link-app/.classpath +++ b/cics-java-liberty-springboot-link-app/.classpath @@ -1,5 +1,10 @@ + + + + + diff --git a/cics-java-liberty-springboot-link-app/.settings/org.eclipse.core.resources.prefs b/cics-java-liberty-springboot-link-app/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/cics-java-liberty-springboot-link-app/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/cics-java-liberty-springboot-link-app/.settings/org.eclipse.jdt.core.prefs b/cics-java-liberty-springboot-link-app/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..2cfd37a --- /dev/null +++ b/cics-java-liberty-springboot-link-app/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/cics-java-liberty-springboot-link-app/build.gradle b/cics-java-liberty-springboot-link-app/build.gradle index aa757d4..80326e3 100644 --- a/cics-java-liberty-springboot-link-app/build.gradle +++ b/cics-java-liberty-springboot-link-app/build.gradle @@ -1,7 +1,7 @@ plugins { - id 'org.springframework.boot' version '3.5.13' - id 'io.spring.dependency-management' version '1.0.11.RELEASE' + id 'org.springframework.boot' version '3.5.16' + id 'io.spring.dependency-management' id 'java' id 'eclipse' id 'idea' @@ -73,6 +73,6 @@ dependencies compileOnly("com.ibm.cics:com.ibm.cics.server") compileOnly("com.ibm.cics:com.ibm.cics.server.invocation.annotations") - //Add tiles-el dependency if using JSF, see READ for more details - implementation ("org.apache.tiles:tiles-el:3.0.8") + // Add tiles-el dependency only if using JSF - see README for more details + // implementation ("org.apache.tiles:tiles-el:3.0.8") } diff --git a/cics-java-liberty-springboot-link-app/pom.xml b/cics-java-liberty-springboot-link-app/pom.xml index 6c33d7e..6821731 100644 --- a/cics-java-liberty-springboot-link-app/pom.xml +++ b/cics-java-liberty-springboot-link-app/pom.xml @@ -74,12 +74,13 @@ provided - + diff --git a/etc/config/liberty/server.xml b/etc/config/liberty/server.xml new file mode 100644 index 0000000..5a82020 --- /dev/null +++ b/etc/config/liberty/server.xml @@ -0,0 +1,11 @@ + + + + + + cicsts:link-1.0 + + cicsts:security-1.0 + + + diff --git a/gradle.properties b/gradle.properties index a395657..6bbd3c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,4 @@ -# -# Values in this file provide defaults to variables used in the -# gradle files. -# - -# Normally we don't publish any built artifacts to a repository. -# But if we do, these are the default values we use to indicate -# where the files should be placed. -# -# These can be over-ridden from the command line -# with -Ppublish_repo_releases_url="file://my-folder" for example. -# -# These values only have any effect if the publish goal is used. -# For example: gradle build publish. -publish_repo_releases_url = 'default-value-for-publish_repo_releases_url' -publish_repo_releases_name = 'default-value-for-publish_repo_releases_name' +# Centralized Java version for Gradle toolchain and Maven compiler java_version = 17 # Gradle daemon improves build performance @@ -21,3 +6,11 @@ org.gradle.daemon=true # Enable parallel builds for faster compilation org.gradle.parallel=true + +# Enable toolchain auto-provisioning to download JDKs if not found locally +# This allows builds to work even if the specific Java version is not installed +org.gradle.java.installations.auto-detect=true +org.gradle.java.installations.auto-download=true + +# Configuration cache disabled due to CICS Bundle Plugin 1.0.8 incompatibility +# org.gradle.configuration-cache=true diff --git a/pom.xml b/pom.xml index 7209067..51611c4 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.9 + 3.5.16 diff --git a/settings.gradle b/settings.gradle index 8662f2c..3f95c48 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,13 @@ +// ============================================================================ +// Toolchain Configuration +// ============================================================================ +// Foojay resolver enables Gradle to automatically download the required JDK +// if it is not found on the local system (requires auto-download in gradle.properties) +plugins +{ + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' +} + // ============================================================================ // Root Project Configuration // ============================================================================ From 5aae35e36638bb1bb127751f7a40c8b07454de1b Mon Sep 17 00:00:00 2001 From: Ivan Hargreaves Date: Thu, 2 Jul 2026 17:19:09 +0100 Subject: [PATCH 2/2] Fix io.spring.dependency-management version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing the explicit version caused the build-gradle job to fail — Gradle requires a version number when resolving plugins from the plugin portal. Updated from the stale 1.0.11.RELEASE to the current stable 1.1.7. --- cics-java-liberty-springboot-link-app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cics-java-liberty-springboot-link-app/build.gradle b/cics-java-liberty-springboot-link-app/build.gradle index 80326e3..de96e6e 100644 --- a/cics-java-liberty-springboot-link-app/build.gradle +++ b/cics-java-liberty-springboot-link-app/build.gradle @@ -1,7 +1,7 @@ plugins { id 'org.springframework.boot' version '3.5.16' - id 'io.spring.dependency-management' + id 'io.spring.dependency-management' version '1.1.7' id 'java' id 'eclipse' id 'idea'