<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>polyglot</artifactId>
<version>24.0.2</version>
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>python</artifactId>
<version>24.0.2</version>
<type>pom</type>
</dependency>
implementation("org.graalvm.polyglot:polyglot:24.0.2")
implementation("org.graalvm.polyglot:python:24.0.2")
import org.graalvm.polyglot.Context;
try (Context context = Context.create()) {
context.eval("python", "print('Hello from GraalPy!')");
}
<plugin>
<groupId>org.graalvm.python</groupId>
<artifactId>graalpy-maven-plugin</artifactId>
<version>24.0.2</version>
<executions>
<execution>
<configuration>
<packages>
<!-- Select Python packages to install via pip. -->
<package>pyfiglet==1.0.2</package>
</packages>
</configuration>
<goals>
<goal>process-graalpy-resources</goal>
</goals>
</execution>
</executions>
</plugin>