Skip to content

Commit 0684316

Browse files
authored
Spring Boot 3 review (#17)
* Correct date on BOM * Update to CICS TS 6.1, Java 17 and Jakarta EE 10 prereqs * Update maintainers * Update maven build to remove extra war libs * Fix gradle build instructions * Remove fat bootwar from gradle build * Remove old Java versions from build
1 parent 4c90d9c commit 0684316

6 files changed

Lines changed: 29 additions & 35 deletions

File tree

.github/workflows/java.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
jdk: [8, 11, 17]
19+
jdk: [17]
2020

2121
steps:
2222
- uses: actions/checkout@v4
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
strategy:
3737
matrix:
38-
jdk: [8, 11, 17]
38+
jdk: [17]
3939

4040
steps:
4141
- uses: actions/checkout@v4

MAINTAINERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
- Alex Brown [@AlexBrown](https://github.com/SoftlySplinter)
55
- Phil Wakelin [@PhilWakelin](https://github.com/PhilWakelin)
66

7-
*Last reviewed:* November 2024
7+
*Last reviewed:* Feb 2026

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ For further details about the development of this sample refer to the tutorial [
88

99
## Requirements
1010

11-
- CICS TS V5.3 or later
11+
- CICS TS V6.1 or later
1212
- A configured Liberty JVM server in CICS
13-
- Java SE 1.8 or later on the workstation
13+
- Jakarta EE 10 or later
14+
- IBM Semeru Runtime Certified Edition Version 17.0 or later on the workstation
1415
- An Eclipse development environment on the workstation (optional)
1516
- Either Gradle or Apache Maven on the workstation (optional if using Wrappers)
1617

@@ -26,12 +27,12 @@ For further details about the development of this sample refer to the tutorial [
2627

2728
### Check dependencies
2829

29-
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.
30+
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.
3031
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)
3132

3233
Gradle (build.gradle):
3334

34-
`compileOnly enforcedPlatform("com.ibm.cics:com.ibm.cics.ts.bom:5.5-20200519131930-PH25409")`
35+
`compileOnly enforcedPlatform("com.ibm.cics:com.ibm.cics.ts.bom:6.1-20250812133513-PH63856")`
3536

3637
Maven (POM.xml):
3738

@@ -41,7 +42,7 @@ Maven (POM.xml):
4142
<dependency>
4243
<groupId>com.ibm.cics</groupId>
4344
<artifactId>com.ibm.cics.ts.bom</artifactId>
44-
<version>5.5-20200519131930-PH25409</version>
45+
<version>6.1-20250812133513-PH63856</version>
4546
<type>pom</type>
4647
<scope>import</scope>
4748
</dependency>
@@ -58,7 +59,7 @@ On the command line, you simply swap the Gradle or Maven command for the wrapper
5859

5960
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.
6061

61-
The required build-tasks are typically `clean bootWar` for Gradle and `clean package` for Maven. Once run, Gradle will generate a WAR file in the `build/libs` directory, while Maven will generate it in the `target` directory.
62+
The required build-tasks are typically `clean build` for Gradle and `clean package` for Maven. Once run, Gradle will generate a WAR file in the `build/libs` directory, while Maven will generate it in the `target` directory.
6263

6364
**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.
6465

@@ -73,12 +74,12 @@ Run the following in a local command prompt:
7374
On Linux or Mac:
7475

7576
```shell
76-
./gradlew clean bootWar
77+
./gradlew clean build
7778
```
7879
On Windows:
7980

8081
```shell
81-
gradlew.bat clean bootWar
82+
gradlew.bat clean build
8283
```
8384

8485
This creates a WAR file inside the `build/libs` directory.
@@ -107,10 +108,8 @@ This creates a WAR file inside the `target` directory.
107108
## Deploying to a CICS Liberty JVM server
108109

109110
- Ensure you have the following features defined in your Liberty `server.xml`:
110-
- `<servlet-3.1>` or `<servlet-4.0>` depending on the version of Java EE in use.
111-
- `<cicsts:security-1.0>` if CICS security is enabled.
112-
113-
>**Note:** `servlet-4.0` will only work for CICS TS V5.5 or later
111+
- `<servlet-6.0>` or later depending on the version of Jakarta EE in use.
112+
- `<cicsts:security-1.0>` if CICS security is enabled.
114113

115114
- Deployment option 1:
116115
- 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.

build.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
plugins
1+
plugins
32
{
43
id 'org.springframework.boot' version '3.5.9'
54
id 'io.spring.dependency-management' version '1.1.7'
@@ -12,6 +11,8 @@
1211
group = 'com.ibm.cicsdev.springboot'
1312
archivesBaseName='cics-java-liberty-springboot-jcics'
1413
version = '0.1.0'
14+
15+
1516
java
1617
{
1718
sourceCompatibility = JavaVersion.VERSION_17
@@ -39,20 +40,16 @@ dependencies
3940
// Tomcat provided by CICS Liberty at runtime
4041
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
4142

42-
// Use correct BOM version for CICS TS (6.1 is the minimum supported release for this sample).
43-
// If you are running on a higher CICS TS version, you may replace this with a newer BOM.)
43+
// Use correct BOM version for CICS TS (6.1 is the minimum supported release for this sample)
44+
// If you are running on a higher CICS TS version, you may replace this with a newer BOM)
4445
compileOnly(enforcedPlatform("com.ibm.cics:com.ibm.cics.ts.bom:6.1-20250812133513-PH63856"))
4546

4647
// JCICS API (version inherited from BOM)
47-
compileOnly("com.ibm.cics:com.ibm.cics.server")
48-
49-
48+
compileOnly("com.ibm.cics:com.ibm.cics.server")
5049
}
51-
// Don't generate a FAT bootWar, we don't need to run standalone
50+
51+
//Don't generate a FAT bootWar, we don't need to run standalone
5252
bootWar { enabled = false }
53-
group = 'com.ibm.cicsdev.springboot'
54-
archivesBaseName='cics-java-liberty-springboot-jcics'
55-
version = '0.1.0'
5653

5754
publishing
5855
{

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
# These values only have any effect if the publish goal is used.
1414
# For example: gradle build publish.
1515
publish_repo_releases_url = 'default-value-for-publish_repo_releases_url'
16-
publish_repo_releases_name = 'default-value-for-publish_repo_releases_name'
17-
java_version = 8
16+
publish_repo_releases_name = 'default-value-for-publish_repo_releases_name'

pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020

2121
<properties>
2222
<java.version>17</java.version>
23-
2423
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2524
<maven.compiler.target>${java.version}</maven.compiler.target>
26-
<maven.compiler.source>${java.version}</maven.compiler.source>
25+
<maven.compiler.source>${java.version}</maven.compiler.source>
26+
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
2727
</properties>
2828

29-
<!-- CICS TS V6.1 BOM (as of Sept 2024) -->
29+
<!--Use correct BOM version for CICS TS (6.1 is the minimum supported release for this sample) -->
30+
<!-- If you are running on a higher CICS TS version, you may replace this with a newer BOM) -->
3031
<dependencyManagement>
3132
<dependencies>
3233
<dependency>
@@ -45,13 +46,11 @@
4546
<groupId>org.springframework.boot</groupId>
4647
<artifactId>spring-boot-starter-web</artifactId>
4748
</dependency>
48-
<!-- Compile against, but don't include JCICS in the final build (version and scope are from
49-
BOM) -->
49+
<!-- Compile against, but don't include JCICS in the final build (version and scope are from BOM) -->
5050
<dependency>
5151
<groupId>com.ibm.cics</groupId>
5252
<artifactId>com.ibm.cics.server</artifactId>
53-
</dependency>
54-
53+
</dependency>
5554

5655
<!-- Compile against, but don't include Tomcat in the runtime build -->
5756
<dependency>

0 commit comments

Comments
 (0)