Skip to content

Commit 45a5acd

Browse files
committed
Sync documentation of main branch
1 parent d2a3b31 commit 45a5acd

17 files changed

+218
-21
lines changed

_data/versioned/main/index/quarkus.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,11 @@ types:
633633
id: security-basic-authentication-howto
634634
type: howto
635635
url: /guides/security-basic-authentication-howto
636+
- title: Frequently asked questions about writing extensions
637+
filename: extension-faq.adoc
638+
id: extensions-faq
639+
type: howto
640+
url: /guides/extension-faq
636641
- title: Quarkus Security with Jakarta Persistence
637642
filename: security-jpa.adoc
638643
summary: You can configure your application to use Jakarta Persistence to store users' identities.

_generated-doc/main/config/quarkus-all-config.adoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,7 +4071,9 @@ a| [[quarkus-core_quarkus-console-color]] [.property-path]##link:#quarkus-core_q
40714071

40724072
[.description]
40734073
--
4074-
If color should be enabled or disabled. If this is not present then an attempt will be made to guess if the terminal supports color
4074+
If color should be enabled or disabled.
4075+
4076+
If this is not present then an attempt will be made to guess if the terminal supports color
40754077

40764078

40774079
ifdef::add-copy-button-to-env-var[]
@@ -4683,9 +4685,9 @@ a| [[quarkus-core_quarkus-log-level]] [.property-path]##link:#quarkus-core_quark
46834685
[.description]
46844686
--
46854687
The log level of the root category, which is used as the default log level for all categories.
4686-
4688+
<p>
46874689
JBoss Logging supports Apache-style log levels:
4688-
4690+
<p>
46894691
* {@link org.jboss.logmanager.Level#FATAL}
46904692
* {@link org.jboss.logmanager.Level#ERROR}
46914693
* {@link org.jboss.logmanager.Level#WARN}
@@ -5355,8 +5357,8 @@ a| [[quarkus-core_quarkus-log-syslog-block-on-reconnect]] [.property-path]##link
53555357

53565358
[.description]
53575359
--
5358-
Enables or disables blocking when attempting to reconnect a `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++TCP
5359-
TCP` or `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++SSL_TCP SSL TCP` protocol
5360+
Enables or disables blocking when attempting to reconnect a `Protocol++#++TCP
5361+
TCP` or `Protocol++#++SSL_TCP SSL TCP` protocol
53605362

53615363

53625364
ifdef::add-copy-button-to-env-var[]
@@ -6044,8 +6046,8 @@ a| [[quarkus-core_quarkus-log-handler-syslog-syslog-handlers-block-on-reconnect]
60446046

60456047
[.description]
60466048
--
6047-
Enables or disables blocking when attempting to reconnect a `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++TCP
6048-
TCP` or `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++SSL_TCP SSL TCP` protocol
6049+
Enables or disables blocking when attempting to reconnect a `Protocol++#++TCP
6050+
TCP` or `Protocol++#++SSL_TCP SSL TCP` protocol
60496051

60506052

60516053
ifdef::add-copy-button-to-env-var[]
@@ -51752,7 +51754,7 @@ a| [[quarkus-narayana-jta_quarkus-transaction-manager-shorten-node-name-if-neces
5175251754

5175351755
[.description]
5175451756
--
51755-
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes.
51757+
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes, encoded to Base64 format and then shortened to 28 bytes.
5175651758

5175751759

5175851760
ifdef::add-copy-button-to-env-var[]

_generated-doc/main/config/quarkus-core_quarkus.console.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ a| [[quarkus-core_quarkus-console-color]] [.property-path]##link:#quarkus-core_q
6666

6767
[.description]
6868
--
69-
If color should be enabled or disabled. If this is not present then an attempt will be made to guess if the terminal supports color
69+
If color should be enabled or disabled.
70+
71+
If this is not present then an attempt will be made to guess if the terminal supports color
7072

7173

7274
ifdef::add-copy-button-to-env-var[]

_generated-doc/main/config/quarkus-core_quarkus.log.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ a| [[quarkus-core_quarkus-log-level]] [.property-path]##link:#quarkus-core_quark
6363
[.description]
6464
--
6565
The log level of the root category, which is used as the default log level for all categories.
66-
66+
<p>
6767
JBoss Logging supports Apache-style log levels:
68-
68+
<p>
6969
* {@link org.jboss.logmanager.Level#FATAL}
7070
* {@link org.jboss.logmanager.Level#ERROR}
7171
* {@link org.jboss.logmanager.Level#WARN}
@@ -735,8 +735,8 @@ a| [[quarkus-core_quarkus-log-syslog-block-on-reconnect]] [.property-path]##link
735735

736736
[.description]
737737
--
738-
Enables or disables blocking when attempting to reconnect a `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++TCP
739-
TCP` or `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++SSL_TCP SSL TCP` protocol
738+
Enables or disables blocking when attempting to reconnect a `Protocol++#++TCP
739+
TCP` or `Protocol++#++SSL_TCP SSL TCP` protocol
740740

741741

742742
ifdef::add-copy-button-to-env-var[]
@@ -1424,8 +1424,8 @@ a| [[quarkus-core_quarkus-log-handler-syslog-syslog-handlers-block-on-reconnect]
14241424

14251425
[.description]
14261426
--
1427-
Enables or disables blocking when attempting to reconnect a `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++TCP
1428-
TCP` or `org.jboss.logmanager.handlers.SyslogHandler.Protocol++#++SSL_TCP SSL TCP` protocol
1427+
Enables or disables blocking when attempting to reconnect a `Protocol++#++TCP
1428+
TCP` or `Protocol++#++SSL_TCP SSL TCP` protocol
14291429

14301430

14311431
ifdef::add-copy-button-to-env-var[]

_generated-doc/main/config/quarkus-narayana-jta.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ a| [[quarkus-narayana-jta_quarkus-transaction-manager-shorten-node-name-if-neces
2828

2929
[.description]
3030
--
31-
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes.
31+
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes, encoded to Base64 format and then shortened to 28 bytes.
3232

3333

3434
ifdef::add-copy-button-to-env-var[]

_generated-doc/main/config/quarkus-narayana-jta_quarkus.transaction-manager.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ a| [[quarkus-narayana-jta_quarkus-transaction-manager-shorten-node-name-if-neces
2828

2929
[.description]
3030
--
31-
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes.
31+
Whether the node name should be shortened if necessary. The node name must not exceed a length of 28 bytes. If this property is set to `true`, and the node name exceeds 28 bytes, the node name is shortened by calculating the link:https://en.wikipedia.org/wiki/SHA-2[SHA-224] hash, which has a length of 28 bytes, encoded to Base64 format and then shortened to 28 bytes.
3232

3333

3434
ifdef::add-copy-button-to-env-var[]

_versions/main/guides/cdi-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ quarkus.index-dependency.<name>.artifact-id=(this one is optional)
113113
quarkus.index-dependency.<name>.classifier=(this one is optional)
114114
----
115115
116-
TIP: If no `artifact-id` is specified then all dependencies with the specificed `group-id` are indexed.
116+
TIP: If no `artifact-id` is specified then all dependencies with the specified `group-id` are indexed.
117117
118118
For example, the following entries ensure that the `org.acme:acme-api` dependency is indexed:
119119
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
////
2+
This document is maintained in the main Quarkus repository
3+
and pull requests should be submitted there:
4+
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
5+
////
6+
[id="extensions-faq"]
7+
= Frequently asked questions about writing extensions
8+
include::_attributes.adoc[]
9+
:diataxis-type: howto
10+
:categories: extensions
11+
////
12+
:extension-status: preview
13+
TODO: uncomment the above for experimental or tech-preview content.
14+
The document header ends at the first blank line. Do not remove the blank line between the header and the abstract summary.
15+
////
16+
17+
## Should you write an extension?
18+
19+
### Why would I want to write an extension?
20+
21+
See the xref:writing-extensions#extension-philosophy[extension philosophy].
22+
23+
One useful thing extensions can do is bundle other extensions.
24+
Have a look at the link:https://quarkus.io/extensions/io.quarkiverse.microprofile/quarkus-microprofile/[Quarkus MicroProfile extension] for an example of aggregator extensions.
25+
26+
### Are there cases an extension isn't necessary?
27+
28+
Not every problem needs an extension!
29+
If you're just bundling up external libraries (that aren't already extensions) and making minor adjustments, you might not need an extension.
30+
For example, plain libraries can create new configuration elements and register classes with Jandex (this link:https://www.loicmathieu.fr/wordpress/en/informatique/quarkus-tip-comment-ne-pas-creer-une-extension-quarkus/[blog shows how]).
31+
32+
33+
## Bytecode transformation
34+
35+
### How can I change the code of things on the classpath?
36+
37+
A `BytecodeTransformerBuildItem` can be used to manipulate bytecode.
38+
For example, see this link:https://quarkus.io/blog/solving-problems-with-extensions/[blog about removed problematic bridge methods from a dependency].
39+
40+
## CDI
41+
42+
### I'm working with CDI, and I don't know how to ...
43+
44+
The xref:cdi-integration.adoc[CDI integration guide] presents solutions to a number of CDI-related use cases for extension authors.
45+
46+
### I have transformed a user class to add an injected field, but CDI isn't working
47+
48+
What happens if an extension transforms a user class using `BytecodeTransformerBuildItem`, and replaces `@jakarta.annotation.Resource` with `@jakarta.inject.Inject`? The field will not be injected by Arc.
49+
Debugging will show the transformed class being loaded in the app, but it looks like Arc doesn't see the new code.
50+
51+
Arc-related transformations should generally be done with link:https://github.com/quarkusio/quarkus/blob/main/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AnnotationsTransformerBuildItem.java[AnnotationsTransformerBuildItem].
52+
The reason is that _all_ Quarkus's bytecode transformations are done after Jandex indexing. This means changes are never reflected back in Jandex.
53+
54+
Most extensions use Jandex as a source of truth to find out what to do. Those extensions won't see new/modified endpoints in the bytecode itself.
55+
The solution to this limitation is annotation transformers. You should also be aware that while Arc and Quarkus REST honour annotation transformers, not all extensions do.
56+
57+
### Something in my classpath has @Inject annotations, which are confusing CDI. How can I fix that?
58+
59+
You will need to implement an `AnnotationsTransformer` and strip out out the problematic injection sites. (Remember, if the use case involves CDI, it needs to be an `AnnotationsTransformer`, not a BytecodeTransformer`.) See link:https://quarkus.io/blog/solving-problems-with-extensions-2/[this blog] about on using an `AnnotationsTransformer` extension to clean non `@Inject` annotations from the Airline library so that it can be used in CDI-enabled runtimes.
60+
61+
## Cross-cutting concerns
62+
63+
### How can I redirect application logging to an external service?
64+
65+
A `LogHandlerBuildItem` is a convenient way to redirect application logs. See this link:https://quarkus.io/blog/quarkus-aws-cloudwatch_extension/[worked example of an extension which directs output to AWS CloudWatch].
66+
67+
## Build and hosting infrastructure for extensions
68+
69+
### Can I use Gradle to build my extension?
70+
71+
Yes, but it's not the most typical pattern.
72+
See the xref:building-my-first-extension.adoc#gradle-setup[Building Your First Extension Guide] for instructions on setting up a Gradle extension. Have a look at the link:https://quarkus.io/extensions/org.jobrunr/quarkus-jobrunr/[JobRunr extension] for an example implementation.
73+
74+
### If I want my extension to be in code.quarkus.io, does it have to be in the Quarkiverse GitHub org?
75+
76+
Registering an extension in the catalog is independent from where the source code is.
77+
The link:https://hub.quarkiverse.io[quarkiverse repository] has some shortcuts to make releasing and testing extensions easier, but any extension can link:https://hub.quarkiverse.io/checklistfornewprojects/#make-your-extension-available-in-the-tooling[register into the catalog].
78+
79+
### My extension isn't showing up on extensions.quarkus.io
80+
81+
Every extension in the link:https://github.com/quarkusio/quarkus-extension-catalog/tree/main/extensions[extension catalog] should appear in http://code.quarkus.io, http://extensions.quarkus.io, and the command line tools.
82+
The web pages at http://extensions.quarkus.io are refreshed a few times a delay, so there may be a delay in new extensions showing up there.
83+
To debug a missing extension, first:
84+
85+
- Check your extension is present in link:https://central.sonatype.com/[Maven Central]
86+
- Check the extension is included the link:https://github.com/quarkusio/quarkus-extension-catalog/tree/main/extensions[extensions catalog list] (it only needs to be included once, and future versions will be automatically detected)
87+
- Check if the extension is listed in the http://https://registry.quarkus.io/q/swagger-ui/#/Client/get_client_extensions_all[Quarkus registry] list of all known extensions
88+
- Check if there has been a green link:https://github.com/quarkusio/extensions/actions/workflows/build_and_publish.yml[build of the extensions site] since updating the catalog
89+
90+
## Other topics
91+
92+
93+
### What's the difference between a quickstart and a codestart?
94+
95+
Both codestarts and quickstarts are designed to help users get coding quickly.
96+
A codestarts is a generated application and a quickstart is browsable source code.
97+
Codestarts allow the creation of customised apps, which makes them quite powerful.

_versions/main/guides/grpc-generation-reference.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,56 @@ To enable this feature, set the `quarkus.generate-code.grpc.use-arg-file` proper
297297

298298
If you are on Windows, and the command line exceeds 8190 characters, Quarkus automatically uses an argument file to pass the arguments to the `protoc` command.
299299

300+
== Local vs. Downloaded `protoc`
301+
302+
To generate gRPC classes, Quarkus uses the `protoc` artifact from the `com.google.protobuf` group id.
303+
However, to ensure the support of various platforms, Quarkus automatically downloads _all_ the possible variants of the `protoc` artifact.
304+
In addition, Quarkus downloads both `protoc` and the plugin used to generate gRPC classes in Java.
305+
For example, even if you are using Linux, Quarkus downloads the `protoc` and the Java plugin artifacts for Windows and MacOS.
306+
307+
The next table lists the different variants of the `protoc` and plugin artifacts:
308+
309+
[col="1,1, 1"]
310+
|===
311+
| *Platform* | *Classifier* | *Dependencies*
312+
313+
| Linux/ARM64 | `linux-aarch_64` | `com.google.protobuf:protoc:VERSION:exe:linux-aarch_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:linux-aarch_64`
314+
| Linux/Power PC 64 bits | `linux-ppcle_64` | `com.google.protobuf:protoc:VERSION:exe:linux-ppcle_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:linux-ppcle_64`
315+
| Linux/S390 64 bits | `linux-s390_64` | `com.google.protobuf:protoc:VERSION:exe:linux-s390_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:linux-s390_64`
316+
| Linux/x86 32bits | `linux-x86_32` | `com.google.protobuf:protoc:VERSION:exe:linux-x86_32` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:linux-x86_32`
317+
| Linux/x86 64bits | `linux-x86_64` | `com.google.protobuf:protoc:VERSION:exe:linux-x86_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:linux-x86_64`
318+
| Mac osx/ARM64 | `osx-aarch_64` | `com.google.protobuf:protoc:VERSION:exe:osx-aarch_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:osx-aarch_64`
319+
| Mac osx/x86 64bits | `osx-x86_64` | `com.google.protobuf:protoc:VERSION:exe:osx-x86_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:osx-x86_64`
320+
| Windows x86 32 bits | `windows-x86_32` | `com.google.protobuf:protoc:VERSION:exe:windows-x86_32` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:windows-x86_32`
321+
| Windows x86 64 bits | `windows-x86_64` | `com.google.protobuf:protoc:VERSION:exe:windows-x86_64` and `io.grpc:protoc-gen-grpc-java:VERSION:exe:windows-x86_64`
322+
|===
323+
324+
Because of the packaging of `protoc` and the plugin (using classifier), it's not possible to exclude undesired platforms individually.
325+
326+
You can, however, exclude the `protoc` dependency altogether and use the `quarkus.grpc.protoc-path` system property to configure the path to the `protoc` executable installed on your machine.
327+
Thus, you don't need to download any `protoc` variants:
328+
329+
.Step 1: Exclusion of `protoc`
330+
[source, xml]
331+
----
332+
<dependency>
333+
<groupId>io.quarkus</groupId>
334+
<artifactId>quarkus-grpc</artifactId>
335+
<exclusions>
336+
<exclusion>
337+
<groupId>com.google.protobuf</groupId>
338+
<artifactId>protoc</artifactId>
339+
</exclusion>
340+
</exclusions>
341+
</dependency>
342+
----
343+
344+
.Step 2: Passing the `quarkus.grpc.protoc-path` property:
345+
[source, shell]
346+
----
347+
mvn clean quarkus:dev -Dquarkus.grpc.protoc-path=/path/to/protoc
348+
----
349+
350+
IMPORTANT: Using this approach requires to have `protoc` installed locally. It will not download any `protoc` artifact.
351+
352+
WARNING: Unfortunately, this only works for `protoc` and not for the Java plugin. The Java plugin is always downloaded.

_versions/main/guides/hibernate-reactive-panache.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ public class PanacheFunctionalityTest {
11331133
}
11341134
----
11351135
<1> Make sure the test method is run on the Vert.x event loop.
1136-
<2> The injected `UniAsserter` agrument is used to make assertions.
1136+
<2> The injected `UniAsserter` argument is used to make assertions.
11371137

11381138
== How and why we simplify Hibernate Reactive mappings
11391139

0 commit comments

Comments
 (0)