Skip to content

Commit

Permalink
Sync documentation of main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 23, 2024
1 parent 8ca6a5d commit 538bdd8
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 54 deletions.

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions _generated-doc/main/config/quarkus-all-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67164,6 +67164,23 @@ endif::add-copy-button-to-env-var[]
|`false`


a|icon:lock[title=Fixed at build time] [[quarkus-swagger-ui_quarkus-swagger-ui-try-it-out-enabled]]`link:#quarkus-swagger-ui_quarkus-swagger-ui-try-it-out-enabled[quarkus.swagger-ui.try-it-out-enabled]`


[.description]
--
If try it out should be enabled by default

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a| [[quarkus-swagger-ui_quarkus-swagger-ui-enable]]`link:#quarkus-swagger-ui_quarkus-swagger-ui-enable[quarkus.swagger-ui.enable]`


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,23 @@ endif::add-copy-button-to-env-var[]
|`false`


a|icon:lock[title=Fixed at build time] [[quarkus-swagger-ui-swagger-ui-config_quarkus-swagger-ui-try-it-out-enabled]]`link:#quarkus-swagger-ui-swagger-ui-config_quarkus-swagger-ui-try-it-out-enabled[quarkus.swagger-ui.try-it-out-enabled]`


[.description]
--
If try it out should be enabled by default

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a|icon:lock[title=Fixed at build time] [[quarkus-swagger-ui-swagger-ui-config_quarkus-swagger-ui-urls-urls]]`link:#quarkus-swagger-ui-swagger-ui-config_quarkus-swagger-ui-urls-urls[quarkus.swagger-ui.urls]`


Expand Down
17 changes: 17 additions & 0 deletions _generated-doc/main/config/quarkus-swaggerui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,23 @@ endif::add-copy-button-to-env-var[]
|`false`


a|icon:lock[title=Fixed at build time] [[quarkus-swaggerui_quarkus-swagger-ui-try-it-out-enabled]]`link:#quarkus-swaggerui_quarkus-swagger-ui-try-it-out-enabled[quarkus.swagger-ui.try-it-out-enabled]`


[.description]
--
If try it out should be enabled by default

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_SWAGGER_UI_TRY_IT_OUT_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a| [[quarkus-swaggerui_quarkus-swagger-ui-enable]]`link:#quarkus-swaggerui_quarkus-swagger-ui-enable[quarkus.swagger-ui.enable]`


Expand Down
56 changes: 3 additions & 53 deletions _versions/main/guides/writing-native-applications-tips.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -228,59 +228,9 @@ As an example, in order to register all methods of class `com.acme.MyClass` for
For more information about the format of this file, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/dynamic-features/Reflection/[GraalVM Reflection in Native Image] guide.
====

The final order of business is to make the configuration file known to the `native-image` executable by adding the proper configuration to `application.properties`:

[source,properties]
----
quarkus.native.additional-build-args =\
-H:+UnlockExperimentalVMOptions,\
-H:ReflectionConfigurationFiles=reflect-config.json,\
-H:-UnlockExperimentalVMOptions
----

[NOTE]
====
Starting with Mandrel 23.1 and GraalVM for JDK 21, `-H:ResourceConfigurationFiles=resource-config.json` results in a warning being shown unless wrapped in `-H:+UnlockExperimentalVMOptions` and `-H:-UnlockExperimentalVMOptions`.
The absence of these options will result in build failures in the future.
====

In the previous snippet we were able to simply use `reflect-config.json` instead of specifying the entire path of the file simply because it was added to `src/main/resources`.
If the file had been added to another directory, the proper file path would have had to be specified manually.

[TIP]
====
Multiple options may be separated by a comma. For example, one could use:
[source,properties]
----
quarkus.native.additional-build-args =\
-H:+UnlockExperimentalVMOptions,\
-H:ResourceConfigurationFiles=resource-config.json,\
-H:ReflectionConfigurationFiles=reflect-config.json,\
-H:-UnlockExperimentalVMOptions
----
in order to ensure that various resources are included and additional reflection is registered.
====
If for some reason adding the aforementioned configuration to `application.properties` is not desirable, it is possible to configure the build tool to effectively perform the same operation.

When using Maven, we could use the following configuration:

[source,xml]
----
<profiles>
<profile>
<id>native</id>
<properties>
<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.additional-build-args>
-H:+UnlockExperimentalVMOptions,-H:ReflectionConfigurationFiles=reflect-config.json,-H:-UnlockExperimentalVMOptions
</quarkus.native.additional-build-args>
</properties>
</profile>
</profiles>
----
The final order of business is to make the configuration file known to the `native-image` executable.
To do that, place the configuration file under the `src/main/resources/META-INF/native-image/<group-id>/<artifact-id>` folder.
This way they will be automatically parsed by the native build, without additional configuration.

[[delay-class-init-in-your-app]]
=== Delaying class initialization
Expand Down

0 comments on commit 538bdd8

Please sign in to comment.