Skip to content

Conversation

@strangelookingnerd
Copy link
Contributor

Ban JUnit 4 imports

To prevent regressions when adding new tests, jenkinsci/plugin-pom#1178 introduced a new flag that enables a Maven Enforcer rule banning org.junit.* imports while allowing org.junit.jupiter.*.

With this change, the build will fail if any org.junit.* imports are introduced.

Testing done

None. Rely on ci.jenkins.io.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@strangelookingnerd strangelookingnerd requested a review from a team as a code owner October 14, 2025 06:37
@jglick jglick added the chore label Dec 17, 2025
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

I do not wish to use a fork from jenkinsci/jenkins-test-harness#988. I maintain RealJenkinsRule.

@strangelookingnerd
Copy link
Contributor Author

I do not wish to use a fork from jenkinsci/jenkins-test-harness#988. I maintain RealJenkinsRule.

I'm having a hard time to understand why this is an issue for this PR in particular. I'm almost certain you have reviewed / merged many other of my PR that proposed similar migrations.

If it helps, having the RealJenkinsExtension in use like it is proposed here would most likely still work when it becomes a thin wrapper as you suggested.

@jglick
Copy link
Member

jglick commented Dec 17, 2025

why this is an issue for this PR in particular

Just because I saw

var plugin = rjr.createSyntheticPlugin(new RealJenkinsExtension.SyntheticPlugin(TrivialBuilder.class).shortName("SymbolLookupAnticacheTest").header("Plugin-Dependencies", "structs:0"));
and realized for the first time that the entire block of RJR logic had been copied.

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.

2 participants