Generates Maven artifact relocations when Quarkus extensions are renamed. Produces relocation POMs, BOM entries, migration guide tables, and OpenRewrite recipes for quarkus-updates.
-
Auto-detect renamed artifacts. Compare the feature's quarkus worktree (or upstream/main if the rename is merged) against the relocations worktree to find artifact ID changes in extension pom.xml files:
Present the detected old-to-new mappings to the user and ask for confirmation before proceeding. The user may add, remove, or correct mappings.
-
Add entries to generaterelocations.java. Edit <number>/relocations/relocations/generaterelocations.java to add the new relocations to the RELOCATIONS static map. Follow the existing pattern:
Function<String, Relocation> myRelocation = a -> Relocation.ofArtifactId(a,
a.replace("old-name-part", "new-name-part"), "<quarkus-version>");
RELOCATIONS.put("quarkus-old-name", myRelocation);
RELOCATIONS.put("quarkus-old-name-deployment", myRelocation);
Use the appropriate factory method:
Relocation.ofArtifactId(old, new, version) -- only artifactId changed
Relocation.ofGroupId(old, newGroup, version) -- only groupId changed
Relocation.of(old, newGroup, newArtifact, version) -- both changed
Important: The version passed here is the upcoming Quarkus release where the rename ships. This version controls the migration guide URL in the generated relocation POMs (e.g., Migration-Guide-3.37). It must match the version used for the quarkus-updates recipe file in step 5. Ask the user which version to use if unclear.
-
Run the generator:
cd ~/git/hibernate/<number>/relocations/relocations
jbang generaterelocations.java
This produces:
- Relocation POM directories under
relocations/
- Updated
relocations/pom.xml with new module entries
- Printed migration guide asciidoc tables (capture for wiki)
- Printed OpenRewrite recipe YAML (capture for quarkus-updates)
-
Add relocations to the BOM. Edit <number>/relocations/bom/application/pom.xml. Find the <!-- Relocations --> section near the end and add new entries before <!-- End of Relocations, please put new extensions above this list -->:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-old-name</artifactId>
<version>${project.version}</version>
</dependency>
Add one entry per relocated artifact (both runtime and deployment).
-
Create OpenRewrite recipe in quarkus-updates (if worktree exists). If <number>/quarkus-updates/ exists:
Important: The recipe file version must match the upcoming Quarkus release where the rename will ship, NOT the version used in generaterelocations.java. The version in the generator is for the relocation POM metadata; the quarkus-updates version is for the migration tooling. Ask the user which upcoming Quarkus version to target if unclear.
Create a new file (do not append to existing version files for old releases):
<number>/quarkus-updates/recipes/src/main/resources/quarkus-updates/core/<upcoming-version>.alpha1.yaml
Use a comment header and a unique recipe name with the version number (dots removed):
---
type: specs.openrewrite.org/v1beta/recipe
name: io.quarkus.updates.core.quarkus<version-no-dots>.MyRelocations
recipeList:
...
If the quarkus-updates worktree does not exist, print the recipe YAML and tell the user to add it manually.
Package and class renames: If the rename also changed Java package names or class names of API types consumed by end users, add additional OpenRewrite recipes to the same file:
- To rename an entire package, use
org.openrewrite.java.ChangePackage:
- org.openrewrite.java.ChangePackage:
oldPackageName: io.quarkus.old.package
newPackageName: io.quarkus.new.package
recursive: true
- If individual class names also changed, use
org.openrewrite.java.ChangeType:
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: io.quarkus.old.package.OldClassName
newFullyQualifiedTypeName: io.quarkus.new.package.NewClassName
Only include these for types that are considered public API and consumed by end users, not internal/deployment classes. Ask the user whether any packages or class names were renamed.
-
Update the migration guide wiki. The generator prints two asciidoc tables — one for publicly consumed modules, one for extension developers. These must be added to the Quarkus migration guide wiki page at https://github.com/quarkusio/quarkus/wiki/Migration-Guide-<quarkus-version>. Print both tables and remind the user to paste them into the wiki under an appropriate section heading.
-
Summarize. Print:
- What relocation POMs were generated
- What was added to the BOM
- Whether the quarkus-updates recipe was written or needs manual action
- The asciidoc tables to add to the migration guide wiki
- Remaining manual steps: commit, create PR on quarkus, create PR on quarkus-updates, update wiki