dashorst opened a new pull request, #1756:
URL: https://github.com/apache/wicket/pull/1756

   Fixes #1755.
   
   This is the master counterpart of #1753, cherry-picked unchanged from 
`wicket-10.x` (91e28d883e). `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, and a migrated project kept 
`experimental.wicket9:wicket-metrics` at 0.x. Both steps are replaced by a 
`ChangeDependencyGroupIdAndArtifactId` that moves 
`experimental.wicket9:wicket-metrics` to `experimental.wicket10` at `10.x`, the 
same shape `MigrateToWicket11` uses for the wicket10 → wicket11 move.
   
   ## Proof
   
   `MigrateToWicket10Test#migrateExperimentalMetrics` against master's unfixed 
recipe:
   
   ```
   [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
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 -- in 
org.apache.wicket.migration.MigrateToWicket11Test
   ```
   
   The 10.x PR (#1753) showed the end-to-end result on a Wicket 9.25.0 
quickstart with `experimental.wicket9:wicket-metrics:0.37`: the released 
10.12.0 recipe leaves it unchanged, and the fixed recipe produces 
`experimental.wicket10:wicket-metrics:10.12.0`. Before merging #1753 I also 
checked a version declared in `dependencyManagement` (moved, and the 
unversioned usage follows) and a version held in a property (the property 
becomes 10.12.0).
   
   `mvn clean verify -Pjs-test` is green.
   
   🤖 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]

Reply via email to