Skip to content

Commit 4b06808

Browse files
Merge pull request #8 from SoftlySplinter/main
Add GitHub Actions CI builds.
2 parents dd1e9cf + 8ae5b63 commit 4b06808

File tree

33 files changed

+793
-683
lines changed

33 files changed

+793
-683
lines changed

.github/workflows/java.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
build-maven:
13+
name: Build Maven
14+
15+
runs-on: ubuntu-latest
16+
continue-on-error: ${{ matrix.experimental }}
17+
strategy:
18+
matrix:
19+
jdk: [8, 11]
20+
experimental: [false]
21+
include:
22+
- jdk: 17
23+
experimental: true
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up JDK ${{ matrix.jdk }}
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: ${{ matrix.jdk }}
30+
distribution: "semeru"
31+
cache: maven
32+
- name: Build with Maven
33+
run: mvn --batch-mode --update-snapshots --file pom.xml -Djava.version=${{ matrix.jdk }} package
34+
- run: mkdir staging && cp ./cics-eventprocessing-java-webapp/target/*.war staging
35+
- uses: actions/upload-artifact@v4
36+
with:
37+
name: cics-java-liberty-sprintboot-jdbc (Maven, Java ${{ matrix.jdk }})
38+
path: staging
39+
40+
build-mvnw:
41+
name: Build Maven Wrapper
42+
43+
runs-on: ubuntu-latest
44+
continue-on-error: ${{ matrix.experimental }}
45+
strategy:
46+
matrix:
47+
jdk: [8, 11]
48+
experimental: [false]
49+
include:
50+
- jdk: 17
51+
experimental: true
52+
steps:
53+
- uses: actions/checkout@v3
54+
- name: Set up JDK ${{ matrix.jdk }}
55+
uses: actions/setup-java@v3
56+
with:
57+
java-version: ${{ matrix.jdk }}
58+
distribution: "semeru"
59+
cache: maven
60+
- name: Build with Maven
61+
run: ./mvnw --batch-mode --update-snapshots --file pom.xml -Djava.version=${{ matrix.jdk }} package
62+
63+
build-gradle:
64+
name: Build Gradle
65+
66+
runs-on: ubuntu-latest
67+
continue-on-error: ${{ matrix.experimental }}
68+
strategy:
69+
matrix:
70+
jdk: [8, 11]
71+
experimental: [false]
72+
include:
73+
- jdk: 17
74+
experimental: true
75+
steps:
76+
- uses: actions/checkout@v3
77+
- name: Set up JDK ${{ matrix.jdk }}
78+
uses: actions/setup-java@v4
79+
with:
80+
java-version: ${{ matrix.jdk }}
81+
distribution: 'semeru'
82+
- name: Build with Gradle
83+
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
84+
with:
85+
arguments: build -Pjava_version=${{ matrix.jdk }}

cics-eventprocessing-java/.mvn/wrapper/MavenWrapperDownloader.java renamed to .mvn/wrapper/MavenWrapperDownloader.java

File renamed without changes.

cics-eventprocessing-java/.mvn/wrapper/maven-wrapper.properties renamed to .mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# cics-eventprocessing-java
2+
[![Build](https://github.com/SoftlySplinter/cics-eventprocessing-java/actions/workflows/java.yaml/badge.svg)](https://github.com/SoftlySplinter/cics-eventprocessing-java/actions/workflows/java.yaml)
23

34
This Java web application demonstrates how to emit and consume CICS events in Java using the JCICS API.
45

@@ -26,8 +27,8 @@ The project consists of two parts:
2627

2728
There are two Java classes:
2829

29-
1. [`EventEmitter.java`](./cics-eventprocessing-java/cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventEmitter.java) - a servlet that emits CICS events
30-
2. [`EventConsumer.java`](./cics-eventprocessing-java/cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventConsumer.java) - the Java code to define the CICS program resource `EVNTCONS` and consume the CICS events
30+
1. [`EventEmitter.java`](./cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventEmitter.java) - a servlet that emits CICS events
31+
2. [`EventConsumer.java`](./cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventConsumer.java) - the Java code to define the CICS program resource `EVNTCONS` and consume the CICS events
3132

3233
The code is built into a WAR file, packaged into a CICS bundle, and deployed to a Liberty JVM server as a web application.
3334

@@ -46,8 +47,6 @@ There are several ways to build this project. We suggest you build with a build
4647

4748
### Building with Gradle
4849

49-
Run the following command from the `cics-eventprocessing-java` directory:
50-
5150
```sh
5251
./gradlew assemble
5352
```
@@ -56,8 +55,6 @@ This will compile the Java code, build a WAR file and package it and the EP adap
5655

5756
### Building with Maven
5857

59-
Run the following command from the `cics-eventprocessing-java` directory:
60-
6158
```sh
6259
./mvnw verify
6360
```
@@ -82,6 +79,8 @@ The Liberty JVM server will need the following features installed at a minimum:
8279
</server>
8380
```
8481

82+
A template `server.xml` is provided [here](./etc/liberty/server.xml).
83+
8584
## Deploying
8685

8786
1. Upload the built bundle ZIP file to zFS on your z/OS system in binary using FTP, or similar

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
allprojects {
3+
group = 'com.ibm.cicsdev.eventprocessing'
4+
version = '0.0.1-SNAPSHOT'
5+
}

cics-eventprocessing-java/cics-eventprocessing-java-bundle/.classpath renamed to cics-eventprocessing-java-bundle/.classpath

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="src" output="target/classes" path="src/main/java">
4-
<attributes>
5-
<attribute name="optional" value="true"/>
6-
<attribute name="maven.pomderived" value="true"/>
7-
</attributes>
8-
</classpathentry>
9-
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
10-
<attributes>
11-
<attribute name="optional" value="true"/>
12-
<attribute name="maven.pomderived" value="true"/>
13-
</attributes>
14-
</classpathentry>
15-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
16-
<attributes>
17-
<attribute name="maven.pomderived" value="true"/>
18-
</attributes>
19-
</classpathentry>
20-
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
21-
<attributes>
22-
<attribute name="maven.pomderived" value="true"/>
23-
</attributes>
24-
</classpathentry>
25-
<classpathentry kind="output" path="target/classes"/>
26-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
10+
<attributes>
11+
<attribute name="optional" value="true"/>
12+
<attribute name="maven.pomderived" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
16+
<attributes>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="output" path="target/classes"/>
26+
</classpath>

cics-eventprocessing-java/cics-eventprocessing-java-bundle/.project renamed to cics-eventprocessing-java-bundle/.project

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<projectDescription>
3-
<name>cics-eventprocessing-java-bundle</name>
4-
<comment></comment>
5-
<projects>
6-
</projects>
7-
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
13-
<buildCommand>
14-
<name>org.eclipse.m2e.core.maven2Builder</name>
15-
<arguments>
16-
</arguments>
17-
</buildCommand>
18-
</buildSpec>
19-
<natures>
20-
<nature>org.eclipse.jdt.core.javanature</nature>
21-
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22-
</natures>
23-
</projectDescription>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>cics-eventprocessing-java-bundle</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>

cics-eventprocessing-java/cics-eventprocessing-java-bundle/build.gradle renamed to cics-eventprocessing-java-bundle/build.gradle

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
/*
2-
* This file was generated by the Gradle 'init' task.
3-
*/
4-
plugins {
5-
id 'com.ibm.cics.bundle' version '1.0.1'
6-
}
7-
8-
cicsBundle {
9-
build {
10-
defaultJVMServer = 'DFHWLP'
11-
}
12-
}
13-
14-
dependencies {
15-
//implementation 'com.ibm.cicsdev.eventprocessing:cics-eventprocessing-java-code:0.0.1-SNAPSHOT'
16-
cicsBundlePart project(path:':cics-eventprocessing-java-webapp', configuration: 'archives')
17-
}
18-
19-
description = 'cics-eventprocessing-java - CICS bundle'
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
plugins {
5+
id 'com.ibm.cics.bundle' version '1.0.3'
6+
}
7+
8+
cicsBundle {
9+
build {
10+
defaultJVMServer = 'DFHWLP'
11+
}
12+
}
13+
14+
dependencies {
15+
//implementation 'com.ibm.cicsdev.eventprocessing:cics-eventprocessing-java-code:0.0.1-SNAPSHOT'
16+
cicsBundlePart project(path:':cics-eventprocessing-java-webapp', configuration: 'archives')
17+
}
18+
19+
description = 'cics-eventprocessing-java - CICS bundle'

cics-eventprocessing-java/cics-eventprocessing-java-bundle/pom.xml renamed to cics-eventprocessing-java-bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<dependencies>
2020
<dependency>
2121
<groupId>${project.groupId}</groupId>
22-
<artifactId>cics-eventprocessing-java-code</artifactId>
22+
<artifactId>cics-eventprocessing-java-webapp</artifactId>
2323
<version>${project.version}</version>
2424
<type>war</type>
2525
</dependency>

cics-eventprocessing-java/cics-eventprocessing-java-bundle/src/main/bundleParts/ACCOUNT.evbind renamed to cics-eventprocessing-java-bundle/src/main/bundleParts/ACCOUNT.evbind

File renamed without changes.

0 commit comments

Comments
 (0)