Skip to content

Relocate arquillian-junit-5-* to arquillian-junit-jupiter and add JUnit 6.x testing#809

Draft
rhusar wants to merge 4 commits into
arquillian:mainfrom
rhusar:relocate-junit5-to-junit-jupiter
Draft

Relocate arquillian-junit-5-* to arquillian-junit-jupiter and add JUnit 6.x testing#809
rhusar wants to merge 4 commits into
arquillian:mainfrom
rhusar:relocate-junit5-to-junit-jupiter

Conversation

@rhusar
Copy link
Copy Markdown
Member

@rhusar rhusar commented Feb 20, 2026

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:

  • Add a JUnit 6 Maven profile that tests the JUnit Jupiter modules against JUnit 6 on Java 17 and 21.
  • Introduce a relocations module providing compatibility artifacts for the old arquillian-junit5 coordinates.

Enhancements:

  • Rename and repackage the existing JUnit 5 modules to arquillian-junit-jupiter-* and update references throughout the build and BOM.
  • Clarify BOM dependency sections to distinguish JUnit 4.x, JUnit Jupiter, and the relocated JUnit 5.x artifacts.

CI:

  • Extend the GitHub Actions CI pipeline with a job that runs the JUnit Jupiter modules under the JUnit 6 profile on supported JDKs.

…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>
@rhusar rhusar marked this pull request as draft February 20, 2026 10:18
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Feb 20, 2026

Reviewer's Guide

Relocates the JUnit 5 integration to a new JUnit Jupiter module namespace, adds relocation POMs for backward compatibility, and introduces CI/build support for testing the JUnit Jupiter modules against both JUnit 5.x and 6.x (Java 17+).

Flow diagram for updated CI workflow with JUnit 6 verification

flowchart TD
  start[CI triggered] --> matrix_default

  subgraph job_default
    matrix_default[Job verify matrix java 8 11 17] --> checkout_default[Checkout arquillian-core]
    checkout_default --> setup_java_default[Setup JDK matrix.java]
    setup_java_default --> maven_verify_default[Maven clean verify]
  end

  start --> matrix_junit6

  subgraph job_junit6
    matrix_junit6[Job junit6-verify matrix java 17 21] --> checkout_junit6[Checkout arquillian-core]
    checkout_junit6 --> setup_java_junit6[Setup JDK matrix.java]
    setup_java_junit6 --> maven_verify_junit6[Maven clean verify with profile junit6 and modules junit-jupiter/core and junit-jupiter/container]
  end
Loading

File-Level Changes

Change Details Files
Introduce CI job to verify JUnit Jupiter modules against JUnit 6 on Java 17 and 21.
  • Add junit6-verify job to GitHub Actions workflow using a Java version matrix (17, 21).
  • Run Maven with -Pjunit6 profile and restrict build to junit-jupiter/core and junit-jupiter/container modules with dependencies (-am).
.github/workflows/ci.yml
Rename and re-namespace JUnit 5 modules to JUnit Jupiter and update internal references.
  • Rename junit5 module directory and parent POM to junit-jupiter with new groupId org.jboss.arquillian.jupiter and artifactId arquillian-junit-jupiter-parent.
  • Rename core and container submodule POMs to arquillian-junit-jupiter-* with updated groupId and artifactIds, and adjust module names to say "JUnit Jupiter".
  • Update integration test POM to depend on the new arquillian-junit-jupiter-container artifact.
  • Update root pom.xml to reference junit-jupiter module instead of junit5 and add new relocations aggregator module.
junit5/core/pom.xml
junit5/container/pom.xml
junit5/pom.xml
junit5/README.adoc
junit-jupiter/core/pom.xml
junit-jupiter/container/pom.xml
junit-jupiter/pom.xml
junit-jupiter/README.adoc
integration-tests/junit5-tests/pom.xml
pom.xml
Adjust BOM and build configuration to differentiate JUnit 4.x, JUnit Jupiter, and the relocated JUnit 5.x artifacts, and to support JUnit 6 testing.
  • Clarify comments in BOM to label JUnit 4.x, JUnit Jupiter, and relocated JUnit 5.x dependencies.
  • Add dependencies on the new arquillian-junit-jupiter-core and -container artifacts to the BOM.
  • Rename version property from version.junit5 to version.junit-jupiter in build POM and use it for junit-bom import.
  • Add junit6 Maven profile overriding version.junit-jupiter to 6.0.2 for testing with JUnit 6.
bom/pom.xml
build/pom.xml
Add relocation POMs to preserve old org.jboss.arquillian.junit5 coordinates and point them to the new JUnit Jupiter artifacts.
  • Create relocations parent POM aggregating relocation modules for JUnit 5 core and container artifacts.
  • Define relocations/arquillian-junit5-core POM that declares old coordinates and distributionManagement/relocation to arquillian-junit-jupiter-core, with dependency on the new artifact.
  • Define relocations/arquillian-junit5-container POM similarly relocating to arquillian-junit-jupiter-container.
relocations/pom.xml
relocations/arquillian-junit5-core/pom.xml
relocations/arquillian-junit5-container/pom.xml

Assessment against linked issues

Issue Objective Addressed Explanation
#805 Rename the Arquillian JUnit 5 modules/artifacts from arquillian-junit5-* to arquillian-junit-jupiter-* across the project (modules, groupIds/artifactIds, and usages).
#805 Provide Maven relocation POMs so the old org.jboss.arquillian.junit5:arquillian-junit5-* artifacts are relocated to the new org.jboss.arquillian.jupiter:arquillian-junit-jupiter-* artifacts.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rhusar
Copy link
Copy Markdown
Member Author

rhusar commented Feb 20, 2026

@jamezp please have a look

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- 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
@rhusar
Copy link
Copy Markdown
Member Author

rhusar commented Feb 20, 2026

Hey - I've left some high level feedback:

  • 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.

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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Addressed.

@rhusar rhusar added the junit-5 label Feb 20, 2026
@hantsy
Copy link
Copy Markdown
Member

hantsy commented Mar 16, 2026

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relocate arquillian-junit-5-* to arquillian-junit-jupiter

2 participants