Contribute AddMockitoJavaAgentToMavenSurefirePlugin Recipe#1128
Merged
timtebeek merged 15 commits intoJun 10, 2026
Merged
Conversation
added 2 commits
June 8, 2026 13:54
…er recipe alignment to Mockito recommendations.
…er recipe alignment to Mockito recommendations.
Member
|
@copilot resolve the merge conflicts in this pull request |
…mockito-dynamic-agent-recipe # Conflicts: # src/main/resources/META-INF/rewrite/recipes.csv
…ore per-tag work Move getArgLineJavaAgentArgument() and buildConfigurationTag() inside the matched surefire branches in visitTag so they no longer run for every tag in the pom, and replace the throwaway new ArrayList<>() default with emptyList().
Replace the /project/build/plugins XPath matchers in visitTag with the framework MavenVisitor.isPluginTag(groupId, artifactId), which matches any plugin under a plugins element (//plugins/plugin) and therefore also covers surefire declarations in build/pluginManagement/plugins. Handle the argLine configuration entirely at the plugin-tag level. Add a test augmenting a surefire plugin declared in pluginManagement.
timtebeek
approved these changes
Jun 10, 2026
timtebeek
left a comment
Member
There was a problem hiding this comment.
Thanks a lot for the contribution here @ryan-hudson ! I've applied some polish to make it smaller and adhere to a few conventions we use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AddSurefireFailsafeArgLineForMockitorecipe called as part of the Java 25 upgrade stack with a new recipe that adds the preferred argLine syntax specified by Mockito. See issue Revising AddSurefireFailsafeArgLineForMockito #1107 for more details.