This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/master by this push:
     new 541a65d62 [SUREFIRE-2057] jpms requires static must be included (#508)
541a65d62 is described below

commit 541a65d6275dd5a5bb2a40be16716ebb2c637609
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Fri Apr 15 21:38:42 2022 +1000

    [SUREFIRE-2057] jpms requires static must be included (#508)
    
    * [SUREFIRE-2057] jpms requires static must be included
    
    Signed-off-by: Olivier Lamy <ol...@apache.org>
    
    * fix mocking
    
    Signed-off-by: Olivier Lamy <ol...@apache.org>
---
 .../main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java | 1 +
 .../apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java  | 1 +
 2 files changed, 2 insertions(+)

diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 64715341a..478914de0 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -2049,6 +2049,7 @@ public abstract class AbstractSurefireMojo
             ResolvePathsRequest<String> req = ResolvePathsRequest.ofStrings( 
testClasspath.getClassPath() )
                     .setIncludeAllProviders( true )
                     .setJdkHome( javaHome )
+                    .setIncludeStatic( true )
                     .setModuleDescriptor( javaModuleDescriptor );
 
             ResolvePathsResult<String> result = 
getLocationManager().resolvePaths( req );
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
index 1362beb31..6f91ccf75 100644
--- 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
+++ 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
@@ -152,6 +152,7 @@ public class AbstractSurefireMojoJava7PlusTest
         mockStatic( ResolvePathsRequest.class );
         when( ResolvePathsRequest.ofStrings( eq( 
testClasspath.toClasspath().getClassPath() ) ) ).thenReturn( req );
         when( req.setJdkHome( anyString() ) ).thenReturn( req );
+        when( req.setIncludeStatic( true ) ).thenReturn( req );
         when( req.setIncludeAllProviders( anyBoolean() ) ).thenReturn( req );
         when( req.setModuleDescriptor( eq( descriptor ) ) ).thenReturn( req );
 

Reply via email to