Relocate arquillian-junit-5-* to arquillian-junit-jupiter and add JUnit 6.x testing#809
Relocate arquillian-junit-5-* to arquillian-junit-jupiter and add JUnit 6.x testing#809rhusar wants to merge 4 commits into
Conversation
Reviewer's GuideRenames the JUnit 5 integration modules to JUnit Jupiter coordinates, adds relocation POMs for the old junit5 artifacts, and introduces a JUnit 6 test profile that is exercised in CI on Java 17 and 21 while tightening Java API compatibility via animal-sniffer. Flow diagram for CI junit6-verify job using Maven junit6 profilegraph TD
GH[GitHub Actions workflow ci.yml]
Job[junit6-verify job]
Matrix[Java matrix 17, 21]
Maven[mvn clean verify -Pjunit6 -pl junit-jupiter/core,junit-jupiter/container -am]
Profile[build/pom.xml junit6 profile<br/>sets version.junit-jupiter 6.0.2]
Modules[junit-jupiter/core and junit-jupiter/container]
GH --> Job
Job --> Matrix
Matrix --> Maven
Maven --> Profile
Profile --> Modules
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@jamezp please have a look |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the relocation POMs (
relocations/arquillian-junit5-coreandrelocations/arquillian-junit5-container), consider changing the packaging topomand removing the explicit dependency on the newjunit-jupiterartifacts so that the relocated coordinates don’t introduce unnecessary transitive dependencies and rely purely on Maven’s relocation metadata. - The relocation modules currently inherit from
arquillian-buildwhile the relocations parent POM inherits fromarquillian-parent; it may be worth aligning these parents (or documenting the rationale) to keep the module hierarchy and build configuration consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the relocation POMs (`relocations/arquillian-junit5-core` and `relocations/arquillian-junit5-container`), consider changing the packaging to `pom` and removing the explicit dependency on the new `junit-jupiter` artifacts so that the relocated coordinates don’t introduce unnecessary transitive dependencies and rely purely on Maven’s relocation metadata.
- The relocation modules currently inherit from `arquillian-build` while the relocations parent POM inherits from `arquillian-parent`; it may be worth aligning these parents (or documenting the rationale) to keep the module hierarchy and build configuration consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Addressed. |
|
I wish the Arquillian core adopting JUnit 6 would be in a new major release (e.g., 2.0), and the JDK baseline would be upgraded to Java 17+ (and all API/SPI code cleaned up to Java 17). |
2b0c528 to
af2aec5
Compare
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the new
junit6Maven profile, consider adding a JDK-based activation (e.g.,<activation><jdk>[17,)</jdk></activation>) so that the profile cannot be accidentally enabled on Java 8/11 where JUnit 6 is not intended to run. - The relocation POMs currently hard-code the parent version (
1.10.1.Final-SNAPSHOT); aligning this with the root project version (e.g., via inheritance or a shared property) would help avoid the parent version drifting out of sync on future releases.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the new `junit6` Maven profile, consider adding a JDK-based activation (e.g., `<activation><jdk>[17,)</jdk></activation>`) so that the profile cannot be accidentally enabled on Java 8/11 where JUnit 6 is not intended to run.
- The relocation POMs currently hard-code the parent version (`1.10.1.Final-SNAPSHOT`); aligning this with the root project version (e.g., via inheritance or a shared property) would help avoid the parent version drifting out of sync on future releases.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
You are wrong - Maven profile activation by JDK would auto-activate this profile on Java 17+, which would switch everyone to JUnit 6 by default. That's not what we want |
af2aec5 to
d285580
Compare
…jupiter-* Rename the JUnit 5 module artifacts to use "junit-jupiter" naming convention to avoid confusion with JUnit version numbers. Users asking for "JUnit 6 support" can now see clearly that this module supports the JUnit Jupiter platform (both JUnit 5 and JUnit 6). Changes: - Rename junit5/ directory to junit-jupiter/ - Rename artifact IDs from arquillian-junit5-* to arquillian-junit-jupiter-* - Add relocations/ module with POMs that redirect old artifact IDs - Update BOM with new coordinates while keeping old ones for compatibility - Update integration tests to use new artifact names Fixes arquillian#805 Signed-off-by: Radoslav Husar <radosoft@gmail.com>
Add a Maven profile 'junit6' that overrides the JUnit version to 6.0.2 and a CI job that tests the JUnit Jupiter module with JUnit 6 on Java 17 and 21 to verify compat. Signed-off-by: Radoslav Husar <radosoft@gmail.com>
…an.jupiter Signed-off-by: Radoslav Husar <radosoft@gmail.com>
- Change packaging to pom (no JAR needed for metadata-only POMs) - Remove unnecessary dependencies on new artifacts (relocation metadata is sufficient for Maven to redirect consumers) - Align parent to arquillian-relocations-parent for consistency Signed-off-by: Radoslav Husar <radosoft@gmail.com>
d285580 to
a24e600
Compare
|
Ready for review @jamezp when you have a minute, thanks. |
Hey @hantsy I totally hear you. Here's the catch: we are NOT doing anything special for Junit 6 as that's runtime compatible with what we are producing here. Sure, it's limited by the JDK t hat Junit 6 itself supports (while we still support JDK 11 here to align with Jakarta). So, for this to happen, we first need to even deprecate stuff properly, which I am pushing a lot, especially in #830 Basically, we/I feel that it would alienate people unnecessarily going to a major version without any real breakage/features/etc. We/I try to break as little as reasonably possible. |
|
Everything is OK now. But I saw there is a 2.0 plan, I hope Arquillain core will use |
Fix #805 and #808
Core design:
Rename artefactId and groupId to remove explicit 'junit5' reference.
Add relocation POM.
Does NOT rename packages.
Summary by Sourcery
Relocate the JUnit 5 integration to new arquillian-junit-jupiter artifacts and introduce infrastructure to verify compatibility with JUnit 6.
New Features:
Enhancements:
CI:
Summary by Sourcery
Rename the JUnit 5 integration modules to JUnit Jupiter, introduce relocation artifacts for the old coordinates, and add infrastructure to test compatibility with JUnit 6 in CI.
New Features:
Enhancements:
CI: