Skip to content

Commit 2b9d94f

Browse files
committed
provide whole META-INF path from ManageResourcesMojo
1 parent 89e338d commit 2b9d94f

File tree

3 files changed

+6
-6
lines changed
  • graalpython

3 files changed

+6
-6
lines changed

graalpython/graalpy-gradle-plugin/src/main/java/org/graalvm/python/tasks/MetaInfTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public abstract class MetaInfTask extends DefaultTask {
5858
@TaskAction
5959
public void exec() {
6060
try {
61-
VFSUtils.writeNativeImageConfig(getManifestOutputDir().get().getAsFile().getAbsolutePath(), GRAALPY_GRADLE_PLUGIN_ARTIFACT_ID);
61+
VFSUtils.writeNativeImageConfig(getManifestOutputDir().get().getAsFile().toPath(), GRAALPY_GRADLE_PLUGIN_ARTIFACT_ID);
6262
} catch (IOException e) {
6363
throw new GradleScriptException("failed to create native image configuration files", e);
6464
}

graalpython/graalpy-maven-plugin/src/main/java/org/graalvm/python/maven/plugin/ManageResourcesMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void execute() throws MojoExecutionException {
138138

139139
private void manageNativeImageConfig() throws MojoExecutionException {
140140
try {
141-
VFSUtils.writeNativeImageConfig(project.getBuild().getOutputDirectory(), GRAALPY_MAVEN_PLUGIN_ARTIFACT_ID);
141+
VFSUtils.writeNativeImageConfig(Path.of(project.getBuild().getOutputDirectory(), "META-INF"), GRAALPY_MAVEN_PLUGIN_ARTIFACT_ID);
142142
} catch (IOException e) {
143143
throw new MojoExecutionException("failed to create native image configuration files", e);
144144
}

graalpython/org.graalvm.python.embedding.tools/src/org/graalvm/python/embedding/tools/vfs/VFSUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public final class VFSUtils {
9898

9999
private static final String GRAALPY_MAIN_CLASS = "com.oracle.graal.python.shell.GraalPythonMain";
100100

101-
public static void writeNativeImageConfig(String metaInfRoot, String pluginId) throws IOException {
102-
Path metaInf = Path.of(metaInfRoot, "native-image", GRAALPY_GROUP_ID, pluginId);
103-
write(metaInf.resolve("resource-config.json"), NATIVE_IMAGE_RESOURCES_CONFIG);
104-
write(metaInf.resolve("native-image.properties"), NATIVE_IMAGE_ARGS);
101+
public static void writeNativeImageConfig(Path metaInfRoot, String pluginId) throws IOException {
102+
Path p = metaInfRoot.resolve(Path.of("native-image", GRAALPY_GROUP_ID, pluginId));
103+
write(p.resolve("resource-config.json"), NATIVE_IMAGE_RESOURCES_CONFIG);
104+
write(p.resolve("native-image.properties"), NATIVE_IMAGE_ARGS);
105105
}
106106

107107
private static void write(Path config, String txt) throws IOException {

0 commit comments

Comments
 (0)