You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Eclipse with the IBM CICS SDK for Java EE, Jakarta EE and Liberty, or any IDE that supports usage of the Maven Central artifact [com.ibm.cics:com.ibm.cics.server.](https://search.maven.org/artifact/com.ibm.cics/com.ibm.cics.server)
18
-
* Either Gradle or Apache Maven on the workstation (optional if using Wrappers)
18
+
* Either Gradle or Apache Maven on the workstation
19
19
20
20
## Downloading
21
21
@@ -52,61 +52,52 @@ Maven (POM.xml):
52
52
53
53
## Building
54
54
55
-
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.
56
-
57
-
On the command line, you simply swap the Gradle or Maven command for the wrapper equivalent, `gradlew` or `mvnw` respectively.
55
+
You can build the sample using an IDE of your choice, or you can build it from the command line. For both approaches, using Gradle or Maven is the recommended way to get a consistent version of build tooling.
58
56
59
-
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.
60
-
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.
57
+
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 a specific version of your chosen build tool.
62
58
63
-
**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.
59
+
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.
64
60
65
-
**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...".
61
+
> [!NOTE]
62
+
> 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...".
66
63
67
64
> [!TIP]
68
65
> In Eclipse, Gradle (buildship) is able to fully refresh and resolve the local classpath even if the project was previously updated by Maven. However, Maven (m2e) does not currently reciprocate that capability. If you previously refreshed the project with Gradle, you'll need to manually remove the 'Project Dependencies' entry on the Java build-path of your Project Properties to avoid duplication errors when performing a Maven Project Update.
69
66
70
67
### Eclipse
71
68
72
69
Import the projects into CICS Explorer using File → Import → General → Existing projects into workspace.
73
-
> **Note:** If using the egit client, you can just clone the repo and tick the button to import all projects.
70
+
> [!NOTE]
71
+
> If using the egit client, you can just clone the repo and tick the button to import all projects.
74
72
75
-
### Gradle Wrapper (command line)
73
+
### Gradle (command line)
76
74
77
75
Run the following in a local command prompt:
78
76
79
-
On Linux or Mac:
80
-
81
77
```shell
82
-
./gradlew clean bootWar
78
+
gradle clean build
83
79
```
84
-
On Windows:
80
+
81
+
This creates a WAR file inside the `cics-java-liberty-link-app/build/libs` directory and a CICS bundle ZIP file inside the `cics-java-liberty-link-bundle/build/distribution` directory.
82
+
83
+
The JVM server the CICS bundle is targeted at is controlled through the `jvmserver` property, defined in the [`gradle.properties`](gradle.properties) file, or in the command line:
85
84
86
85
```shell
87
-
gradlew.bat clean bootWar
86
+
gradle clean build -Pjvmserver=MYJVMS
88
87
```
89
88
90
-
This creates a WAR file inside the `build/libs` directory.
91
-
92
-
### Maven Wrapper (command line)
89
+
### Maven (command line)
93
90
94
91
95
92
Run the following in a local command prompt:
96
93
97
-
On Linux or Mac:
98
-
99
94
```shell
100
-
./mvnw clean package
95
+
mvn clean package
101
96
```
102
97
103
-
On Windows:
104
-
105
-
```shell
106
-
mvnw.cmd clean package
107
-
```
98
+
This creates a WAR file inside the `cics-java-liberty-link-app/target` directory and a CICS bundle zIP file inside the `cics-java-liberty-link-bundle/target` directory.
108
99
109
-
This creates a WAR file inside the `target` directory.
100
+
The JVM server the CICS bundle is targeted at is controlled throught the `jvmserver` property, defined in [`cics-java-liberty-link-bundle/pom.xml`](cics-java-liberty-link-bundle/pom.xm)file under the `defaultjvmserver` configuration property.
110
101
111
102
## Deploying to a Liberty JVM server
112
103
@@ -155,4 +146,4 @@ CECI LINK PROG(HELLOWLP) CHANNEL(CHAN)
155
146
Alternatively, the enterprise Java program can be run using the provided `WLPH` transaction.
156
147
157
148
## Find out more
158
-
For more information about invoking Java EE applications in a Liberty JVM server from CICS programs, see [Linking to Java applications in a Liberty JVM server by using the @CICSProgram annotation](https://www.ibm.com/docs/en/cics-ts/6.1?topic=djariljs-linking-java-applications-in-liberty-jvm-server-by-using-cicsprogram-annotation).
149
+
For more information about invoking Java EE applications in a Liberty JVM server from CICS programs, see [Linking to Java applications in a Liberty JVM server by using the @CICSProgram annotation](https://www.ibm.com/docs/en/cics-ts/latest?topic=djariljs-linking-java-applications-in-liberty-jvm-server-by-using-cicsprogram-annotation).
0 commit comments