This is an automated email from the ASF dual-hosted git repository.
dashorst pushed a commit to branch wicket-10.x
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/wicket-10.x by this push:
new 91e28d883e Let MigrateToWicket10 move wicket-metrics to the
experimental.wicket10 groupId
91e28d883e is described below
commit 91e28d883e48cd3488aacf7abd75c7e69c0b5254
Author: Martijn Dashorst <[email protected]>
AuthorDate: Sun Nov 1 15:28:30 2026 +0100
Let MigrateToWicket10 move wicket-metrics to the experimental.wicket10
groupId
MigrateToWicket10 handled the experimental modules with two identical
UpgradeDependencyVersion steps that upgraded
org.apache.wicket.experimental.wicket9:* to 10.x. The experimental.wicket9
artifacts were only ever published with 0.x versions, so the 10.x range
matched nothing and the steps changed nothing. In Wicket 10, wicket-metrics
is published under org.apache.wicket.experimental.wicket10. A Wicket 9
project that used wicket-metrics kept experimental.wicket9:wicket-metrics
at its 0.x version after the migration, next to Wicket 10 core artifacts.
The experimental http2 modules are removed earlier in the recipe, so
wicket-metrics was the only artifact these steps could have applied to.
Both steps are replaced by a ChangeDependencyGroupIdAndArtifactId that
moves experimental.wicket9:wicket-metrics to experimental.wicket10 at the
latest 10.x release, the same way MigrateToWicket11 moves it from
experimental.wicket10 to experimental.wicket11. A project migrated with
the recipe now ends up on experimental.wicket10:wicket-metrics.
MigrateToWicket10Test#migrateExperimentalMetrics covers the move.
GitHub issue #1752
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../src/main/resources/META-INF/rewrite/wicket.yml | 11 ++---
.../wicket/migration/MigrateToWicket10Test.java | 47 ++++++++++++++++++++++
2 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/wicket-migration/src/main/resources/META-INF/rewrite/wicket.yml
b/wicket-migration/src/main/resources/META-INF/rewrite/wicket.yml
index 1d78b7f5f0..7168551c86 100644
--- a/wicket-migration/src/main/resources/META-INF/rewrite/wicket.yml
+++ b/wicket-migration/src/main/resources/META-INF/rewrite/wicket.yml
@@ -35,12 +35,9 @@ recipeList:
groupId: org.apache.wicket
artifactId: "*"
newVersion: 10.x
- - org.openrewrite.maven.UpgradeDependencyVersion:
- groupId: org.apache.wicket.experimental.wicket9
- artifactId: "*"
- newVersion: 10.x
- - org.openrewrite.maven.UpgradeDependencyVersion:
- groupId: org.apache.wicket.experimental.wicket9
- artifactId: "*"
+ - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
+ oldGroupId: org.apache.wicket.experimental.wicket9
+ oldArtifactId: wicket-metrics
+ newGroupId: org.apache.wicket.experimental.wicket10
newVersion: 10.x
---
diff --git
a/wicket-migration/src/test/java/org/apache/wicket/migration/MigrateToWicket10Test.java
b/wicket-migration/src/test/java/org/apache/wicket/migration/MigrateToWicket10Test.java
index 91fb6007a3..cd6c71c628 100644
---
a/wicket-migration/src/test/java/org/apache/wicket/migration/MigrateToWicket10Test.java
+++
b/wicket-migration/src/test/java/org/apache/wicket/migration/MigrateToWicket10Test.java
@@ -128,4 +128,51 @@ class MigrateToWicket10Test implements RewriteTest {
);
}
+ @Test
+ void migrateExperimentalMetrics() {
+ //language=xml
+ rewriteRun(
+ mavenProject("any-project",
+ pomXml("""
+ <project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>wicket</artifactId>
+ <version>1.0.0</version>
+ <dependencies>
+ <dependency>
+
<groupId>org.apache.wicket.experimental.wicket9</groupId>
+
<artifactId>wicket-metrics</artifactId>
+ <version>0.35</version>
+ </dependency>
+ </dependencies>
+ </project>
+ """,
+ spec -> spec.after(pom -> {
+ Matcher version =
Pattern.compile("<version>(10\\.[^<]+)</version>").matcher(pom);
+
assertThat(version.find()).describedAs("Expected 10.x in %s", pom).isTrue();
+ return String.format("""
+ <project>
+
<modelVersion>4.0.0</modelVersion>
+ <groupId>com.example</groupId>
+ <artifactId>wicket</artifactId>
+ <version>1.0.0</version>
+ <properties>
+
<maven.compiler.release>17</maven.compiler.release>
+ </properties>
+ <dependencies>
+ <dependency>
+
<groupId>org.apache.wicket.experimental.wicket10</groupId>
+
<artifactId>wicket-metrics</artifactId>
+ <version>%s</version>
+ </dependency>
+ </dependencies>
+ </project>
+ """, version.group(1));
+ })
+ )
+ )
+ );
+ }
+
}