-1

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?

Jiehong
  • 786
  • 1
  • 7
  • 16
  • There is nothing in the maven release notes about compling Maven itself with GrallVM, because there are no such plans and no there is not maven itself compiled with GraalVM because it will not work... – khmarbaise Aug 24 '23 at 19:09
  • @khmarbaise: you assumed release notes actually talked about future plans, but this is not the case... – Jiehong Aug 31 '23 at 08:01
  • No the release state the current state correct.. But you might have found a glimpse about that, but you won't do so. Also there is nothing in the idea storage to go that way because it's technically not possible.. except for the Maven Daemon also see (https://github.com/apache/maven-mvnd) further plans/ideas: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=5964567 – khmarbaise Aug 31 '23 at 17:24

1 Answers1

1

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.

peterz
  • 306
  • 1
  • 3
  • Yes correct the plugins are being loading during the build and that exactly is one of the most important reasons that compling via GraalVM will not work... and you can't build for each pom on the whole planet a separate native image because every build looks different uses different versions of plugins and different plugins and different JDK runtimes etc. – khmarbaise Aug 25 '23 at 12:53