File tree 1 file changed +10
-0
lines changed
native-maven-plugin/src/main/java/org/graalvm/buildtools/maven 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 62
62
import org .eclipse .aether .resolution .DependencyResult ;
63
63
import org .graalvm .buildtools .utils .NativeImageConfigurationUtils ;
64
64
65
+ import java .io .File ;
65
66
import java .io .IOException ;
66
67
import java .io .UncheckedIOException ;
67
68
import java .nio .file .Files ;
@@ -297,10 +298,19 @@ private List<Path> findJunitPlatformNativeJars(Set<Module> modulesAlreadyOnClass
297
298
.stream ()
298
299
.map (ArtifactResult ::getArtifact )
299
300
.filter (a -> !modulesAlreadyOnClasspath .contains (new Module (a .getGroupId (), a .getArtifactId ())))
301
+ .filter (a -> imageClasspath .stream ().noneMatch (entry -> matchGroup (entry , a .getGroupId ()) && matchArtifact (entry , a .getArtifactId ())))
300
302
.map (a -> a .getFile ().toPath ())
301
303
.collect (Collectors .toList ());
302
304
}
303
305
306
+ private boolean matchGroup (Path entry , String groupId ) {
307
+ return entry .toString ().contains (groupId .replace ("." , File .separator ));
308
+ }
309
+
310
+ private boolean matchArtifact (Path entry , String artifactId ) {
311
+ return entry .toString ().contains (artifactId );
312
+ }
313
+
304
314
private static final class Module {
305
315
private final String groupId ;
306
316
private final String artifactId ;
You can’t perform that action at this time.
0 commit comments