Search code examples
mavengraalvm-native-image

maven cli: native version compiled with GraalVM


Maven starts a bit slowly, and maven daemon was created to help keep a warmed-up JVM running in the background at all times.

But now that GraalVM exists, and its capacity to produce stand-alone executable with AOT, it shouldn't be necessary anymore.

I tried to find something like that, but everything online is about compiling a project with GraalVM and maven, but not about Maven itself.

Maven has release notes, but there is nothing about such plans there. I have to admit that even the release notes for the upcoming version 4 don't even highlight why a new major version is bringing, except "new maven 4 api".

So the official docs aren't the most helpful, and I couldn't find any mention of GraalVM inside the maven git repository.

Are there any version of Maven compiled with GraalVM or any plans to build one someday?


Solution

  • I believe Maven does lots of dynamic class loading (think plugins). This won't work as native image, or at least one would have to configure and create separate images for about every POM file.