slachiewicz opened a new pull request, #12719:
URL: https://github.com/apache/maven/pull/12719

   Five classes in `its/core-it-suite` were already annotated with the Jupiter 
`@Test` but still called `org.junit.Assert`, which is the only thing still 
pulling JUnit 4 onto the IT classpath. They now use 
`org.junit.jupiter.api.Assertions`.
   
   Four needed nothing but the static import swapped. The fifth is the one 
worth a second look:
   
   ```java
   -        assertTrue("Jar output path was not built", 
Files.isRegularFile(jarPath));
   +        assertTrue(Files.isRegularFile(jarPath), "Jar output path was not 
built");
   ```
   
   The message is the **first** argument in JUnit 4 and the **last** in JUnit 
5. Left as a plain import swap it would still compile — `assertTrue(String, 
boolean)` has no Jupiter overload, so that one actually fails to compile, but 
the equivalent `assertEquals(message, expected, actual)` form does not, and 
silently asserts the wrong thing. Worth watching for in similar cleanups.
   
   ### Verification — please read before merging
   
   I could not run this suite. The `its` reactor needs the `0.1-stub-SNAPSHOT` 
plugin artifacts and `2.1-SNAPSHOT` it-support artifacts built first, and that 
build does not complete in my environment. What I did instead:
   
   - a standalone `javac` compile check of the changed files against a 
classpath assembled from the cached `maven-it-helper` jar plus 
`junit-jupiter-api`/`opentest4j`/`apiguardian`, with **no JUnit 4 jar present** 
— clean
   - confirmed no `org.junit.Assert` reference remains anywhere in 
`its/core-it-suite/src/test/java`
   - confirmed no line exceeds 120 characters (the `its` reactor does not 
configure spotless, so there is no formatter to run)
   
   So this is compile-checked, not test-run. Given the change is import-level 
plus one argument reorder, CI should settle it — but I would rather say that 
plainly than imply I ran the ITs.
   
   The same change is on the 4.0.x line as a separate PR.
   
   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]

Reply via email to