From e72c091779b4ab11223315a0e4b7ad20dbe62335 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Wed, 9 Aug 2023 22:54:31 +0200 Subject: [PATCH] Add platform loader to Maven Mojo provided class file locator. --- .../src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java b/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java index d6c0735ea9..a3ad476482 100644 --- a/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java +++ b/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java @@ -438,6 +438,7 @@ private Plugin.Engine.Summary apply(File root, EntryPoint entryPoint = (initialization == null ? new Initialization() : initialization).getEntryPoint(classLoaderResolver, project.getGroupId(), project.getArtifactId(), managed == null ? project.getVersion() : managed, project.getPackaging()); getLog().info("Resolved entry point: " + entryPoint); List classFileLocators = new ArrayList(classPath.size()); + classFileLocators.add(ClassFileLocator.ForClassLoader.ofPlatformLoader()); for (String target : classPath) { File artifact = new File(target); classFileLocators.add(artifact.isFile() ? ClassFileLocator.ForJarFile.of(artifact) : new ClassFileLocator.ForFolder(artifact));