Skip to content

Migration Guide 3.14

Guillaume Smet edited this page Aug 8, 2024 · 25 revisions
Note

We highly recommend the use of quarkus update to update to a new version of Quarkus.

Items marked below with ⚙️ ✅ are automatically handled by quarkus update.

Dev Services

Several Dev Services default images have been updated:

  • PostgreSQL from 14 to 16

  • MySQL from 8.0 to 8.4

  • MongoDB from 4.4 to 7.0

Extension developers

This paragraph only concerns people developing their own Quarkus extensions.

Getting your application to compile

The extension annotation processor that is used to generate some files required for the Quarkus runtime and the configuration documentation has been redeveloped from scratch. It is a lot more flexible but comes with some new constraints:

  • You cannot mix configuration using the legacy @ConfigRoot approach (i.e. without a corresponding @ConfigMapping annotation) and the new @ConfigMapping approach in the same module. This shouldn’t be too much of a problem.

  • If you use the new @ConfigMapping approach, you don’t need to configure anything. The change should be transparent for you.

  • If you use the legacy @ConfigRoot approach (i.e. without a corresponding @ConfigMapping annotation), you need to inform the annotation processor of it:

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>io.quarkus</groupId>
                                <artifactId>quarkus-extension-processor</artifactId>
                                <version>${quarkus.version}</version>
                            </path>
                        </annotationProcessorPaths>
                        <compilerArgs>
                            <arg>-AlegacyConfigRoot=true</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>

    The important part is the added compilerArgs -AlegacyConfigRoot=true.

    Note that this will result in a warning when compiling the test classes. To alleviate this issue, it is recommended to only enable the annotation processor for the default-compile execution (which compiles the main classes):

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>default-compile</id>
                            <configuration>
                                <annotationProcessorPaths>
                                    <path>
                                        <groupId>io.quarkus</groupId>
                                        <artifactId>quarkus-extension-processor</artifactId>
                                        <version>${quarkus.version}</version>
                                    </path>
                                </annotationProcessorPaths>
                                <compilerArgs>
                                    <arg>-AlegacyConfigRoot=true</arg>
                                </compilerArgs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

Publishing the config documentation

Clone this wiki locally