client-samples
client-samples copied to clipboard
[Enviroment] GraalVM installation directory not found
I can not run project to export APK/IPA for Android/iOS. Please help me to figure out this problem. Thanks.
"/Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home/bin/java" -Dmaven.multiModuleProjectDirectory=/Users/henry/Downloads/client-samples-master/Maven/HelloWorld "-Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=64882:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.5 com.gluonhq:client-maven-plugin:0.1.31:package
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< hello:helloworld >--------------------------
[INFO] Building helloWorld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- client-maven-plugin:0.1.31:package (default-cli) @ helloworld ---
org.apache.maven.plugin.MojoExecutionException: GraalVM installation directory not found. Either set GRAALVM_HOME as an environment variable or set graalvmHome in client-plugin configuration
at com.gluonhq.NativeBaseMojo.createSubstrateDispatcher(NativeBaseMojo.java:131)
at com.gluonhq.NativePackageMojo.execute(NativePackageMojo.java:47)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.958 s
[INFO] Finished at: 2020-08-30T15:03:57+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:client-maven-plugin:0.1.31:package (default-cli) on project helloworld: Error: GraalVM installation directory not found. Either set GRAALVM_HOME as an environment variable or set graalvmHome in client-plugin configuration -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException






<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hello</groupId>
<artifactId>helloworld</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>helloWorld</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<client.plugin.version>0.1.31</client.plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>client-maven-plugin</artifactId>
<version>${client.plugin.version}</version>
<configuration>
<!-- Uncomment to run on iOS: -->
<target>ios</target>
<mainClass>hello.HelloWorld</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>gluon-releases</id>
<url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</pluginRepository>
</pluginRepositories>
</project>
Are you running your project directly from IntelliJ's Maven window? If that is the case, GRAALVM_HOME
might not be defined, and you get the error:
GraalVM installation directory not found. Either set GRAALVM_HOME as an environment variable or set graalvmHome in client-plugin configuration
that explains how to solve it:
<configuration>
<target>iOS</target>
<graalvmHome>/path/to/your/GraalVMHome</graalvmHome>
<mainClass>hello.HelloWorld</mainClass>
</configuration>
Alternatively, you can add the environment variable to IntelliJ.
And finally, you can also go to the Terminal view in IntelliJ, and run mvn client:package
, as the environment variable is defined.
Either way, I see you are running client:package
, but did you run first client:build
?
@jperedadnr : I see you are running client:package, but did you run first client:build => Yes, I have run client: clean +build before package
Do you know how to resolve that ?
/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/henry/Downloads/client-samples-master/Maven/HelloWorld "-Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=61782:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.5 com.gluonhq:client-maven-plugin:0.1.31:build
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< hello:helloworld >--------------------------
[INFO] Building helloWorld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- client-maven-plugin:0.1.31:build (default-cli) @ helloworld ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.315 s
[INFO] Finished at: 2020-09-02T23:40:22+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:client-maven-plugin:0.1.31:build (default-cli) on project helloworld: Error, client:build failed: Error while executing process. Cannot run program "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/mvn" (in directory "/Users/henry/Downloads/client-samples-master/Maven/HelloWorld"): error=13, Permission denied -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have tried this one but not work for resolving this issue above?
sudo /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/henry/Downloads/client-samples-master/Maven/HelloWorld "-Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=61782:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.5 com.gluonhq:client-maven-plugin:0.1.31:build