Skip to content

Commit 9282939

Browse files
Merge pull request #5 from cicsdev/documentation-improvements
Improve documentation
2 parents c0ea6da + e8a3fb8 commit 9282939

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ This is a set of sample Eclipse projects for Link to Liberty, demonstrating how
1212
- [etc/eclipse_projects/com.ibm.cics.server.examples.wlp.link.bundle](./etc/eclipse_projects/com.ibm.cics.server.examples.wlp.link.bundle) - CICS bundle project (CICS Explorer)
1313

1414
## Prerequisites
15-
* CICS TS V5.4 or later
15+
* CICS TS V5.5 or later
1616
* Java SE 1.8 or later on the workstation
1717
* 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
1919

2020
## Downloading
2121

@@ -52,61 +52,52 @@ Maven (POM.xml):
5252

5353
## Building
5454

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.
5856

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.
6258

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.
6460

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...".
6663
6764
> [!TIP]
6865
> 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.
6966
7067
### Eclipse
7168

7269
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.
7472
75-
### Gradle Wrapper (command line)
73+
### Gradle (command line)
7674

7775
Run the following in a local command prompt:
7876

79-
On Linux or Mac:
80-
8177
```shell
82-
./gradlew clean bootWar
78+
gradle clean build
8379
```
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:
8584

8685
```shell
87-
gradlew.bat clean bootWar
86+
gradle clean build -Pjvmserver=MYJVMS
8887
```
8988

90-
This creates a WAR file inside the `build/libs` directory.
91-
92-
### Maven Wrapper (command line)
89+
### Maven (command line)
9390

9491

9592
Run the following in a local command prompt:
9693

97-
On Linux or Mac:
98-
9994
```shell
100-
./mvnw clean package
95+
mvn clean package
10196
```
10297

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.
10899

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.
110101

111102
## Deploying to a Liberty JVM server
112103

@@ -155,4 +146,4 @@ CECI LINK PROG(HELLOWLP) CHANNEL(CHAN)
155146
Alternatively, the enterprise Java program can be run using the provided `WLPH` transaction.
156147

157148
## 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).

cics-java-liberty-link-bundle/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</execution>
3838
</executions>
3939
<configuration>
40-
<defaultjvmserver>DFHWLP</defaultjvmserver>
40+
<defaultjvmserver>${jvmserver}</defaultjvmserver>
4141
<url>${cmci_url}</url>
4242
<username>${cmci_username}</username>
4343
<password>${cmci_password}</password>
@@ -49,4 +49,4 @@
4949
</plugin>
5050
</plugins>
5151
</build>
52-
</project>
52+
</project>

pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
<description>Sample CICS Java program showing use of the
1515
com.ibm.cics.server.invocation.CICSProgram annotation for Link to Liberty.</description>
1616

17+
<properties>
18+
<java.version>1.8</java.version>
19+
<jvmserver>DFHWLP</jvmserver>
20+
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
<maven.compiler.target>${java.version}</maven.compiler.target>
23+
<maven.compiler.source>${java.version}</maven.compiler.source>
24+
</properties>
25+
1726
<dependencyManagement>
1827
<dependencies>
1928
<dependency>
@@ -30,4 +39,4 @@
3039
<module>cics-java-liberty-link-app</module>
3140
<module>cics-java-liberty-link-bundle</module>
3241
</modules>
33-
</project>
42+
</project>

0 commit comments

Comments
 (0)