0

I'm trying to package a project using native-image-maven-plugin from GraalVM. I don't want to install native-image-tool, and I receiving the following error: Image building on Java 11+ without native-image requires MAVEN_OPTS='--add-exports=java.base/jdk.internal.module=ALL-UNNAMED'

I've tried different ways to add these options but keep getting the same error. I would be grateful if someone could tell me how to add these options to the embedded Maven from Intellij.

Thanks in advance

Ikaro
  • 165
  • 1
  • 12
  • VM options for maven server can be configured in "Settings/Preferences | Build, Execution, Deployment | Build Tools | Maven | Runner | VM options" . – y.bedrov May 27 '20 at 14:11
  • I did it like that but doesn't worked for me. I'm getting the same error message. – Ikaro Jun 04 '20 at 07:29
  • Please attach screenshot from "Settings/Preferences | Build, Execution, Deployment | Build Tools | Maven | Runner | VM options" with configured options. – y.bedrov Jun 04 '20 at 08:35

1 Answers1

1

I have the same error working from the command line on windows 10. The only way to get one step further was to definitively install the native-image extension with gu install native-image and then copy <GRAAVM_HOME>\lib\svm\bin\native-image.exe to <GRAAVM_HOME>\bin as suggested here: https://github.com/oracle/graal/issues/2151#issuecomment-647522072

zaphod
  • 126
  • 4