Skip to content

Revising AddSurefireFailsafeArgLineForMockito #1107

@nmck257

Description

@nmck257

Hi, just noticed the current impl which adds --adds-opens flags to surefire execution.
38caf16#diff-9b48fea6f3aa733eafe641cece4c0679a04e5420d3ea7ac94c5a02ce32091497

I have a recipe in my environment that more-closely matches Mockito's advice:

...by incorporating this config:

 <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-dependency-plugin</artifactId>
     <executions>
         <execution>
             <goals>
                 <goal>properties</goal>
             </goals>
         </execution>
     </executions>
 </plugin>
 <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-surefire-plugin</artifactId>
     <configuration>
         <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
     </configuration>
 </plugin>

...but I was slow to contribute it upstream :)

I'd like to contribute that recipe and pivot the Java upgrade recipes to use that pattern instead.
Any concerns?

@timtebeek , @steve-aom-elliott

Metadata

Metadata

Assignees

No one assigned

    Labels

    recipeRecipe requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions