Skip to content

Exclude transitive junit:junit 3.8.1 from maven-project to fix Surefire 3.6.0 vintage engine failure - #22

Merged
chrjohn merged 2 commits into
masterfrom
copilot/exclude-junit-from-classpath
Oct 22, 2026
Merged

chrjohn merged 2 commits into
masterfrom
copilot/exclude-junit-from-classpath

Conversation

Copilot AI commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

junit:junit:3.8.1 reaches the classpath transitively through maven-project:2.2.1 → plexus-container-default:1.0-alpha-9-stable-1. With Surefire 3.6.0 (Dependabot PR #19), this activates the junit-vintage engine, and CI fails with TestEngine with ID 'junit-vintage' failed to discover tests. The project only uses JUnit 5.

  • pom.xml
    • Excludes junit:junit from the org.apache.maven:maven-project dependency, which is the only path that brings it in.
<dependency>
    <groupId>org.apache.maven</groupId>
    <artifactId>maven-project</artifactId>
    <version>2.2.1</version>
    <scope>provided</scope>
    <exclusions>
        <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix JUnit Vintage engine activation by excluding JUnit 3.8.1 Exclude transitive junit:junit 3.8.1 from maven-project to fix Surefire 3.6.0 vintage engine failure Oct 22, 2026
Copilot AI requested a review from chrjohn October 22, 2026 10:09
@chrjohn chrjohn added this to the 3.0.3 milestone Oct 22, 2026
@chrjohn
chrjohn marked this pull request as ready for review October 22, 2026 11:20
@chrjohn
chrjohn merged commit 1cdc7df into master Oct 22, 2026
12 checks passed
@chrjohn
chrjohn deleted the copilot/exclude-junit-from-classpath branch October 22, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants