Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit 3f2fb02

Browse files
committed
Cleaned up pom.xml and fixed AsciiDoctor warnings
Signed-off-by: Guillermo González de Agüero <[email protected]>
1 parent d65ebfb commit 3f2fb02

File tree

19 files changed

+186
-450
lines changed

19 files changed

+186
-450
lines changed

pom.xml

Lines changed: 1 addition & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,7 @@
3131

3232
<properties>
3333
<maven.site.skip>true</maven.site.skip>
34-
<asciidoctor.maven.plugin.version>1.5.7.1</asciidoctor.maven.plugin.version>
35-
<!-- XXX - jbake needs an older version than this -->
36-
<asciidoctorj.version>1.6.2</asciidoctorj.version>
37-
<asciidoctorj.pdf.version>1.5.0-alpha.16</asciidoctorj.pdf.version>
38-
<jruby.version>9.2.6.0</jruby.version>
39-
<!-- status: DRAFT, BETA, etc., or blank for final -->
40-
<status>DRAFT</status>
34+
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
4135
</properties>
4236
<scm>
4337
<connection>scm:git:[email protected]:eclipse-ee4j/jakartaee-tutorial.git</connection>
@@ -53,101 +47,10 @@
5347
<build>
5448
<defaultGoal>package</defaultGoal>
5549
<plugins>
56-
<plugin>
57-
<groupId>org.apache.maven.plugins</groupId>
58-
<artifactId>maven-enforcer-plugin</artifactId>
59-
<version>1.4.1</version>
60-
<executions>
61-
<execution>
62-
<id>enforce-versions</id>
63-
<goals>
64-
<goal>enforce</goal>
65-
</goals>
66-
<configuration>
67-
<rules>
68-
<requireJavaVersion>
69-
<version>[1.8.0,1.9.0)</version>
70-
<message>You need JDK8 or lower</message>
71-
</requireJavaVersion>
72-
</rules>
73-
</configuration>
74-
</execution>
75-
</executions>
76-
</plugin>
77-
<!--<plugin>
78-
<groupId>org.glassfish.doc</groupId>
79-
<artifactId>glassfish-doc-maven-plugin</artifactId>
80-
<executions>
81-
<execution>
82-
<id>generate-toc</id>
83-
<phase>generate-resources</phase>
84-
<goals>
85-
<goal>toc</goal>
86-
</goals>
87-
<configuration>
88-
<chapterPatterns>
89-
[0-9]+\s.*,Preface.*,Part\s.*
90-
</chapterPatterns>
91-
<ignoreTagPatterns>JEET.*</ignoreTagPatterns>
92-
</configuration>
93-
</execution>
94-
<execution>
95-
<id>generate-book</id>
96-
<phase>generate-resources</phase>
97-
<goals>
98-
<goal>book</goal>
99-
</goals>
100-
</execution>
101-
</executions>
102-
</plugin>-->
103-
<!--<plugin>
104-
<groupId>com.blazebit</groupId>
105-
<artifactId>jbake-maven-plugin</artifactId>
106-
<version>1.0.0</version>
107-
<configuration>
108-
<outputDirectory>${site.output.dir}</outputDirectory>
109-
<properties>
110-
<status>${status}</status>
111-
</properties>
112-
</configuration>
113-
<executions>
114-
<execution>
115-
<id>build-site</id>
116-
<phase>generate-resources</phase>
117-
<goals>
118-
<goal>build</goal>
119-
</goals>
120-
</execution>
121-
</executions>
122-
<dependencies>
123-
<dependency>
124-
<groupId>org.asciidoctor</groupId>
125-
<artifactId>asciidoctorj</artifactId>
126-
<version>1.5.5</version>
127-
</dependency>
128-
</dependencies>
129-
</plugin>-->
13050
<plugin>
13151
<groupId>org.asciidoctor</groupId>
13252
<artifactId>asciidoctor-maven-plugin</artifactId>
13353
<version>${asciidoctor.maven.plugin.version}</version>
134-
<dependencies>
135-
<dependency>
136-
<groupId>org.jruby</groupId>
137-
<artifactId>jruby-complete</artifactId>
138-
<version>${jruby.version}</version>
139-
</dependency>
140-
<dependency>
141-
<groupId>org.asciidoctor</groupId>
142-
<artifactId>asciidoctorj</artifactId>
143-
<version>${asciidoctorj.version}</version>
144-
</dependency>
145-
<dependency>
146-
<groupId>org.asciidoctor</groupId>
147-
<artifactId>asciidoctorj-pdf</artifactId>
148-
<version>${asciidoctorj.pdf.version}</version>
149-
</dependency>
150-
</dependencies>
15154
<executions>
15255
<execution>
15356
<id>asciidoc-to-html</id>
@@ -194,43 +97,7 @@
19497
</dependency>
19598
</dependencies>
19699
</plugin>
197-
198-
<!--
199-
This is the rule that builds the zip file for download.
200-
-->
201-
<!--<plugin>
202-
<artifactId>maven-assembly-plugin</artifactId>
203-
<inherited>false</inherited>
204-
<executions>
205-
<execution>
206-
<phase>package</phase>
207-
<goals>
208-
<goal>single</goal>
209-
</goals>
210-
<configuration>
211-
<descriptors>
212-
<descriptor>tutorial.xml</descriptor>
213-
</descriptors>
214-
</configuration>
215-
</execution>
216-
</executions>
217-
</plugin>-->
218100
</plugins>
219-
220-
<pluginManagement>
221-
<plugins>
222-
<plugin>
223-
<groupId>org.glassfish.doc</groupId>
224-
<artifactId>glassfish-doc-maven-plugin</artifactId>
225-
<version>1.2</version>
226-
</plugin>
227-
<plugin>
228-
<groupId>org.apache.maven.plugins</groupId>
229-
<artifactId>maven-assembly-plugin</artifactId>
230-
<version>2.4</version>
231-
</plugin>
232-
</plugins>
233-
</pluginManagement>
234101
</build>
235102

236103
<profiles>

src/main/asciidoc/batch-processing/batch-processing002.adoc

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,14 @@ Java classes to run the jobs in a batch application.
4444
The process for creating a batch application in Jakarta EE is the
4545
following.
4646

47-
1. Design the batch application.
48-
1. Identify the input sources, the format of the input data, the
49-
desired final result, and the required processing phases.
50-
2. Organize the application as a job with chunk-oriented steps,
51-
task-oriented steps, and decision elements. Determine the dependencies
52-
between them.
53-
3. Determine the order of execution in terms of transitions between
54-
steps.
55-
4. Identify steps that can run in parallel and steps that can run in
56-
more than one thread.
57-
2. Create the batch artifacts as Java classes by implementing the
58-
interfaces specified by the framework for steps, decision elements, and
59-
so on. These Java classes contain the code to read data from input
60-
sources, format items, process items, and store results. Batch artifacts
61-
can access context objects from the batch runtime using dependency
62-
injection.
63-
3. Define jobs, steps, and their execution flow in XML files using the
64-
Job Specification Language. The elements in the XML files reference
65-
batch artifacts implemented as Java classes. The batch artifacts can
66-
access properties declared in the XML files, such as names of files and
67-
databases.
68-
4. Use the Java API provided by the batch runtime to launch the batch
47+
. Design the batch application.
48+
.. Identify the input sources, the format of the input data, the desired final result, and the required processing phases.
49+
.. Organize the application as a job with chunk-oriented steps, task-oriented steps, and decision elements. Determine the dependencies between them.
50+
.. Determine the order of execution in terms of transitions between steps.
51+
.. Identify steps that can run in parallel and steps that can run in more than one thread.
52+
. Create the batch artifacts as Java classes by implementing the interfaces specified by the framework for steps, decision elements, and so on. These Java classes contain the code to read data from input sources, format items, process items, and store results. Batch artifacts can access context objects from the batch runtime using dependency injection.
53+
. Define jobs, steps, and their execution flow in XML files using the Job Specification Language. The elements in the XML files reference batch artifacts implemented as Java classes. The batch artifacts can access properties declared in the XML files, such as names of files and databases.
54+
. Use the Java API provided by the batch runtime to launch the batch
6955
application.
7056

7157
The following sections describe in detail how to use the components of

src/main/asciidoc/bean-validation-advanced/bean-validation-advanced001.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ public String doSomething(String param1, String param2) { ... }
106106
In the preceding example, the target is set to the return value of the
107107
method.
108108

109-
==== Implementing Temporal Constraints Using ClockProvider
110-
111109
[[implementing-temporal-constraints-using-clockprovider]]
112110

111+
==== Implementing Temporal Constraints Using ClockProvider
112+
113113
In Jakarta Bean Validation 2.0, a Clock instance is available for validator implementations to validate any temporal date or time based constraints.
114114
[source,java]
115115
----
@@ -140,9 +140,9 @@ public class CustomConstraintValidator implements ConstraintValidator<CustomCons
140140
----
141141
See ClockProvider in `https://jakarta.ee/specifications/platform/8/apidocs/`.
142142

143+
[[custom-constraints]]
143144
==== Custom Constraints
144145

145-
[[custom-constraints]]
146146
Consider an employee in a firm located in U.S.A. When you register the phone number of an employee or modify the phone number, the phone number needs to be validated to ensure that the phone number conforms to US phone number pattern.
147147
[source,java]
148148
----
@@ -167,8 +167,10 @@ public class Employee extends Person {
167167
The constraint definition `@USPhoneNumber` is define in the sample listed under link:#GKAIA[Using the Built-In Constraints to Make a New Constraint].
168168
In the sample, another constraint `@Pattern` is used to validate the phone number.
169169

170-
==== Using In-Built Value Extractors in Custom Containers
171170
[[using-in-built-value-extractors-in-custom-containers]]
171+
172+
==== Using In-Built Value Extractors in Custom Containers
173+
172174
Cascading validation:
173175

174176
Bean Validation supports cascading validation for various entities. You can specify `@Valid` on a member of the object that is validated to ensure that the member is also validated in a cascading fashion. You can validate type arguments, for example, parameterized types and its members if the members have the specified `@Valid` annotation.

src/main/asciidoc/ejb-gettingstarted/ejb-gettingstarted003.adoc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,20 @@ the exchange rate in the `dollarToYen` business method of the
1616

1717
To modify `ConverterServlet`, the procedure is the same.
1818

19-
1. Edit `ConverterBean.java` and save the file.
20-
2. Recompile the source file.
21-
* To recompile `ConverterBean.java` in NetBeans IDE, right-click the
19+
. Edit `ConverterBean.java` and save the file.
20+
. Recompile the source file.
21+
.. To recompile `ConverterBean.java` in NetBeans IDE, right-click the
2222
`converter` project and select Run.
2323
+
24-
This recompiles the `ConverterBean.java` file, replaces the old class
25-
file in the build directory, and redeploys the application to GlassFish
26-
Server.
27-
* Recompile `ConverterBean.java` using Maven.
28-
1. In a terminal window, go to the
24+
This recompiles the `ConverterBean.java` file, replaces the old class file in the build directory, and redeploys the application to GlassFish Server.
25+
.. Recompile `ConverterBean.java` using Maven.
26+
... In a terminal window, go to the
2927
tut-install`/examples/ejb/converter/` directory.
30-
2. Enter the following command:
28+
... Enter the following command:
3129
+
3230
[source,java]
3331
----
3432
mvn install
3533
----
3634
+
3735
This command repackages and deploys the application.
38-
39-

src/main/asciidoc/jaxrs/jaxrs003.adoc

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,15 @@ The following topics are addressed here:
3333

3434
====== To Create a RESTful Web Service Using NetBeans IDE
3535

36-
1. Ensure you have installed the tutorial archetypes as described in
37-
link:#CHDJGCCA[Installing the Tutorial Archetypes].
38-
2. In NetBeans IDE, create a simple web application using the
39-
`jaxrs-service-archetype` Maven archetype. This archetype creates a very
40-
simple "Hello, World" web application.
41-
1. From the File menu, choose New Project.
42-
2. From Categories, select Maven. From Projects, select Project From
43-
Archetype. Click Next.
44-
3. Under Search enter `jaxrs-service`, select the
45-
`jaxrs-service-archetype`, and click Next.
46-
4. Under Project Name enter `HelloWorldApplication`, set the Project
47-
Location, and set the Package name to `jakarta.tutorial.hello`, and click
48-
Finish.
36+
. Ensure you have installed the tutorial archetypes as described in link:#CHDJGCCA[Installing the Tutorial Archetypes].
37+
. In NetBeans IDE, create a simple web application using the `jaxrs-service-archetype` Maven archetype. This archetype creates a very simple "Hello, World" web application.
38+
.. From the File menu, choose New Project.
39+
.. From Categories, select Maven. From Projects, select Project From Archetype. Click Next.
40+
.. Under Search enter `jaxrs-service`, select the `jaxrs-service-archetype`, and click Next.
41+
.. Under Project Name enter `HelloWorldApplication`, set the Project Location, and set the Package name to `jakarta.tutorial.hello`, and click Finish.
4942
+
5043
The project is created.
51-
3. In `HelloWorld.java`, find the `getHtml()` method. Replace the
52-
`//TODO` comment with the following text, so that the finished product
53-
resembles the following method:
44+
. In `HelloWorld.java`, find the `getHtml()` method. Replace the `//TODO` comment with the following text, so that the finished product resembles the following method:
5445
+
5546
[source,java]
5647
----
@@ -72,11 +63,10 @@ return statement.
7263

7364
|=======================================================================
7465

75-
4. Right-click the `HelloWorldApplication` project in the Projects pane
76-
and select Run.
66+
. Right-click the `HelloWorldApplication` project in the Projects pane and select Run.
7767
+
7868
This will build and deploy the application to GlassFish Server.
79-
5. In a browser, open the following URL:
69+
. In a browser, open the following URL:
8070
+
8171
[source,java]
8272
----
@@ -245,13 +235,10 @@ Server. A web browser window will open to the following URL:
245235
----
246236
http://localhost:8080/rsvp/index.xhtml
247237
----
248-
8. In the web browser window, click the Event status link for the
249-
Duke's Birthday event.
238+
8. In the web browser window, click the Event status link for the Duke's Birthday event.
250239
+
251240
You'll see the current invitees and their responses.
252-
9. Click the current response of one of the invitees in the Status
253-
column of the table, select a new response, and click Update your
254-
status.
241+
9. Click the current response of one of the invitees in the Status column of the table, select a new response, and click Update your status.
255242
+
256243
The invitee's new status should now be displayed in the table of
257244
invitees and their response statuses.
@@ -261,12 +248,8 @@ invitees and their response statuses.
261248
To Run the rsvp Example Application Using Maven
262249
+++++++++++++++++++++++++++++++++++++++++++++++
263250

264-
1. If the database server is not already running, start it by following
265-
the instructions in link:#BNADK[Starting and
266-
Stopping Apache Derby].
267-
2. Make sure that GlassFish Server has been started (see
268-
link:#BNADI[Starting and Stopping GlassFish
269-
Server]).
251+
1. If the database server is not already running, start it by following the instructions in link:#BNADK[Starting and Stopping Apache Derby].
252+
2. Make sure that GlassFish Server has been started (see link:#BNADI[Starting and Stopping GlassFish Server]).
270253
3. In a terminal window, go to:
271254
+
272255
[source,java]
@@ -287,16 +270,12 @@ This command builds, assembles, and deploys `rsvp` to GlassFish Server.
287270
----
288271
http://localhost:8080/rsvp/
289272
----
290-
6. In the web browser window, click the Event status link for the
291-
Duke's Birthday event.
273+
6. In the web browser window, click the Event status link for the Duke's Birthday event.
292274
+
293275
You'll see the current invitees and their responses.
294-
7. Click the current response of one of the invitees in the Status
295-
column of the table, select a new response, and click Update your
296-
status.
276+
7. Click the current response of one of the invitees in the Status column of the table, select a new response, and click Update your status.
297277
+
298-
The invitee's new status should now be displayed in the table of
299-
invitees and their response statuses.
278+
The invitee's new status should now be displayed in the table of invitees and their response statuses.
300279

301280
[[GIRCI]][[real-world-examples]]
302281

0 commit comments

Comments
 (0)