dashorst opened a new pull request, #1753:
URL: https://github.com/apache/wicket/pull/1753
Fixes #1752.
`MigrateToWicket10` tried to migrate the experimental modules with two
identical `UpgradeDependencyVersion` steps for
`org.apache.wicket.experimental.wicket9:*` to `10.x`. The
`experimental.wicket9` artifacts only exist as 0.x versions, so the steps never
matched anything. In Wicket 10, `wicket-metrics` lives under
`org.apache.wicket.experimental.wicket10`, so a migrated project kept
`experimental.wicket9:wicket-metrics` at 0.x.
This PR replaces both steps with a `ChangeDependencyGroupIdAndArtifactId`
that moves `experimental.wicket9:wicket-metrics` to `experimental.wicket10` at
`10.x`, the same shape `MigrateToWicket11` uses for the wicket10 → wicket11
move. The http2 modules are already removed earlier in the recipe, so
`wicket-metrics` is the only artifact concerned. The new test
`MigrateToWicket10Test#migrateExperimentalMetrics` resolves from Maven Central,
like `migrateDependencies` in the same class.
## Proof
New test against the unfixed recipe (`mvn verify -pl wicket-migration
-Dtest=MigrateToWicket10Test`):
```
[ERROR]
MigrateToWicket10Test.migrateExperimentalMetrics:134->lambda$migrateExperimentalMetrics$2:153
[Expected 10.x in <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.wicket9</groupId>
<artifactId>wicket-metrics</artifactId>
<version>0.35</version>
</dependency>
</dependencies>
</project>]
Expecting value to be true but was false
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
```
With the fix:
```
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 -- in
org.apache.wicket.migration.MigrateToWicket10Test
```
A Wicket 9.25.0 quickstart with `experimental.wicket9:wicket-metrics:0.37`
added, migrated with `rewrite-maven-plugin` 6.46.1 and
`-Drewrite.activeRecipes=org.apache.wicket.MigrateToWicket10`:
| Recipe | `wicket.version` | `wicket-metrics` |
|---|---|---|
| `wicket-migration:10.12.0` (released) | 9.25.0 |
`experimental.wicket9:wicket-metrics:0.37` |
| `wicket-migration:10.13.0-SNAPSHOT` (this branch) | 10.12.0 |
`experimental.wicket10:wicket-metrics:10.12.0` |
The `wicket.version` column reflects #1741, which is already on
`wicket-10.x`.
`mvn clean verify -Pjs-test` is green.
## Scope
`wicket-10.x` only. Master's copy of `MigrateToWicket10` has the same two
steps and is not part of this PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]