slachiewicz opened a new pull request, #170: URL: https://github.com/apache/maven-rar-plugin/pull/170
`RarMavenProjectStub` was calling the static `PlexusTestCase.getBasedir()` helper — the last direct reference to the JUnit 3-era class in this repo. It now calls `PlexusExtension.getBasedir()` from `plexus-testing`, which is already on the test classpath transitively via maven-plugin-testing-harness. **Why the call stays qualified rather than static-imported:** `RarMavenProjectStub` declares its own `getBasedir()` override, so an unqualified static-imported call inside that class would resolve to the instance method instead — silent infinite recursion. Worth knowing if this pattern gets repeated elsewhere. `junit-jupiter-api` and `junit-vintage-engine` are added test-scoped (versions managed by the parent). They are needed because maven-plugin-testing-harness excludes `junit-jupiter-api` from its `plexus-testing` dependency and declares its own copy as optional, so `PlexusExtension` — which implements `BeforeEachCallback`/`AfterEachCallback` — will not compile in a consuming plugin without them. This matches what maven-ejb-plugin already does. **Not addressed here:** `RarMojoTest` still extends `AbstractMojoTestCase`, which extends `PlexusTestCase` inside maven-plugin-testing-harness. That inheritance lives in the harness artifact, not in this repo, so it is not actionable here. The vintage engine keeps it running. ### Verification `mvn test` before: `Tests run: 4, Failures: 0, Errors: 0, Skipped: 0` (surefire selecting `JUnit4Provider`). `mvn test` after: `Tests run: 4, Failures: 0, Errors: 0, Skipped: 0` (surefire selecting `JUnitPlatformProvider`, `RarMojoTest` running via the vintage engine — no discovery loss). `spotless:check` clean. Draft until CI confirms. Generated-by: Claude Opus 5 (1M context) -- 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]
