Skip to content

Commit d593202

Browse files
committed
Documentation adjusted, GH Action fine-tuned. Hoping for the best
1 parent fbd9ba4 commit d593202

File tree

7 files changed

+130
-126
lines changed

7 files changed

+130
-126
lines changed

.github/workflows/release.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
echo "${SECRING_FILE}" | base64 -d > "${GITHUB_WORKSPACE}/secring.gpg"
3939
echo "Publishing Artifacts for $RELEASE_VERSION"
4040
(set -x; ./gradlew -Pversion="${RELEASE_VERSION}" -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
41-
echo "Publishing Documentation"
42-
./gradlew asciidoctor -Pversion="${RELEASE_VERSION}"
4341
- name: Bump patch version by one
4442
uses: actions-ecosystem/action-bump-semver@v1
4543
id: bump_semver
@@ -48,7 +46,7 @@ jobs:
4846
level: patch
4947
- name: Set version in gradle.properties
5048
env:
51-
NEXT_VERSION: ${{ steps.bump_semver.next_version }}
49+
NEXT_VERSION: ${{ steps.bump_semver.new_version }}
5250
run: |
5351
echo "Preparing next snapshot"
5452
./gradlew snapshotVersion -Pversion="${NEXT_VERSION}"
@@ -62,7 +60,8 @@ jobs:
6260
- name: Build documentation
6361
env:
6462
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
65-
run: ./gradlew asciidoctor -Pversion="${RELEASE_VERSION}"
63+
run: |
64+
./gradlew asciidoctor -Pversion="${RELEASE_VERSION}"
6665
- name: Export Gradle Properties
6766
uses: micronaut-projects/github-actions/export-gradle-properties@master
6867
- name: Publish to Github Pages
@@ -73,7 +72,7 @@ jobs:
7372
TARGET_REPOSITORY: ${{ github.repository }}
7473
GH_TOKEN: ${{ secrets.GH_TOKEN }}
7574
BRANCH: gh-pages
76-
FOLDER: build/docs
75+
FOLDER: build/asciidoc
7776
DOC_FOLDER: latest
7877
COMMIT_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
7978
COMMIT_NAME: ${{ secrets.GIT_USER_NAME }}

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#Thu, 02 Dec 2021 15:11:36 +0000
2-
version=-SNAPSHOT
1+
#Thu, 02 Dec 2021 16:56:19 +0100
2+
version=3.0.5-SNAPSHOT
33
grailsVersion=4.0.11

src/docs/asciidoc/api/.ignore

Whitespace-only changes.

src/docs/asciidoc/examples.adoc

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
The following are some simple examples to give you a feel for the plugin.
2+
3+
=== Service Queue Listeners
4+
5+
[source,groovy]
6+
----
7+
class ListeningService {
8+
9+
static exposes = ['jms']
10+
11+
def onMessage(message) {
12+
assert message == 1
13+
}
14+
}
15+
----
16+
17+
[source,groovy]
18+
----
19+
class SomeController {
20+
21+
def jmsService
22+
23+
def someAction = {
24+
jmsService.send(service: 'listening', 1)
25+
}
26+
}
27+
----
28+
29+
=== Service Method Queue Listeners
30+
31+
[source,groovy]
32+
----
33+
import grails.plugin.jms.Queue
34+
35+
class ListeningService {
36+
37+
static exposes = ['jms']
38+
39+
@Queue
40+
def receive(message) {
41+
assert message == 1
42+
}
43+
}
44+
----
45+
46+
[source,groovy]
47+
----
48+
class SomeController {
49+
50+
def jmsService
51+
52+
def someAction = {
53+
jmsService.send(service: 'listening', method: 'receive', 1)
54+
}
55+
}
56+
----
57+
58+
=== Topic Listeners
59+
60+
[source,groovy]
61+
----
62+
import grails.plugin.jms.Subscriber
63+
64+
class ListeningService {
65+
66+
static exposes = ['jms']
67+
68+
@Subscriber
69+
def newMessages(message) {
70+
assert message == 1
71+
}
72+
}
73+
----
74+
75+
[source,groovy]
76+
----
77+
class SomeController {
78+
79+
def jmsService
80+
81+
def someAction = {
82+
jmsService.send(topic: 'newMessages', 1)
83+
}
84+
}
85+
----
86+
87+
=== Post Processing Messages
88+
89+
[source,groovy]
90+
----
91+
import javax.jms.Message
92+
93+
class SomeController {
94+
95+
def jmsService
96+
97+
def someAction = {
98+
jmsService.send(service: 'initial', 1) { Message msg ->
99+
msg.JMSReplyTo = createDestination(service: 'reply')
100+
msg
101+
}
102+
}
103+
}
104+
----

src/docs/asciidoc/index.adoc

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= JMS Plugin
2-
:version: 3.0.1-SNAPSHOT
2+
:version: x.y.z
33
:source-highlighter: coderay
44
:imagesdir: ./images
55

@@ -8,6 +8,14 @@
88

99
include::introduction.adoc[]
1010

11+
[[installation]]
12+
== Installation
13+
include::installation.adoc[]
14+
15+
[[examples]]
16+
== Examples
17+
include::examples.adoc[]
18+
1119
[[springJms]]
1220
== Spring JMS
1321

src/docs/asciidoc/installation.adoc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
The plugin is available on Maven Central and should be a dependency like this:
3+
4+
[source,groovy,subs="attributes"]
5+
----
6+
dependencies {
7+
implementation 'io.github.gpc:jms:{version}'
8+
}
9+
----
10+
11+
In older versions of Gradle, replace `implementation` with `compile`

src/docs/asciidoc/introduction.adoc

-118
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,4 @@
11

22
This plugin makes it easy to both send and receive JMS messages inside a Grails application.
3-
== Include in project
43

5-
The plugin is available on Maven Central and should be a dependency like this:
64

7-
[source,groovy,subs="attributes"]
8-
----
9-
dependencies {
10-
compile 'io.github.gpc:jms:{version}'
11-
}
12-
----
13-
14-
In newer Gradle versions, replace `compile` with `implementation`
15-
16-
== Examples
17-
18-
The following are some simple examples to give you a feel for the plugin.
19-
20-
21-
=== Service Queue Listeners
22-
23-
[source,groovy]
24-
----
25-
class ListeningService {
26-
27-
static exposes = ['jms']
28-
29-
def onMessage(message) {
30-
assert message == 1
31-
}
32-
}
33-
----
34-
35-
[source,groovy]
36-
----
37-
class SomeController {
38-
39-
def jmsService
40-
41-
def someAction = {
42-
jmsService.send(service: 'listening', 1)
43-
}
44-
}
45-
----
46-
47-
=== Service Method Queue Listeners
48-
49-
[source,groovy]
50-
----
51-
import grails.plugin.jms.Queue
52-
53-
class ListeningService {
54-
55-
static exposes = ['jms']
56-
57-
@Queue
58-
def receive(message) {
59-
assert message == 1
60-
}
61-
}
62-
----
63-
64-
[source,groovy]
65-
----
66-
class SomeController {
67-
68-
def jmsService
69-
70-
def someAction = {
71-
jmsService.send(service: 'listening', method: 'receive', 1)
72-
}
73-
}
74-
----
75-
76-
=== Topic Listeners
77-
78-
[source,groovy]
79-
----
80-
import grails.plugin.jms.Subscriber
81-
82-
class ListeningService {
83-
84-
static exposes = ['jms']
85-
86-
@Subscriber
87-
def newMessages(message) {
88-
assert message == 1
89-
}
90-
}
91-
----
92-
93-
[source,groovy]
94-
----
95-
class SomeController {
96-
97-
def jmsService
98-
99-
def someAction = {
100-
jmsService.send(topic: 'newMessages', 1)
101-
}
102-
}
103-
----
104-
105-
=== Post Processing Messages
106-
107-
[source,groovy]
108-
----
109-
import javax.jms.Message
110-
111-
class SomeController {
112-
113-
def jmsService
114-
115-
def someAction = {
116-
jmsService.send(service: 'initial', 1) { Message msg ->
117-
msg.JMSReplyTo = createDestination(service: 'reply')
118-
msg
119-
}
120-
}
121-
}
122-
----

0 commit comments

Comments
 (0)