Search code examples
javaspring-bootgradlegraalvm

GraalVM "Invalid GAV coordinates" error? (Spring boot 3)


Recently I downloaded Spring Boot 3 to test the embedded GraalVM. I run the `./gradlew native compile command the result is:

$ ./gradlew nativeCompile

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':nativeCompile'.
> Invalid GAV coordinates: groovy:it_groovy_comparre: (expected format: groupId:artifactId: version)

....

BUILD FAILED in 752ms

What is my problem with dependencies? When I run that command in debug mode there is nothing new except this error.

NOTE:

  • my $JAVA_HOME variable value is: /home/<my username>/.jdks/graalvm-ce-java17-22.3.0/, which point to a Graalvm java
  • my build automation tool is Gradle.
  • When I tested the command in groovy the result was the same

Solution

  • I found the solution. Firstly I added a version to my build.gradle file like this :

    plugins {
        // ...
    }
    
    group = 'groovy'
    version = '1' // <-------------- HERE
    sourceCompatibility = '17'
    
    configurations {
        //...
    }
    

    Just before executing the command ./gradlew nativeCompile, I ran the following two commands :

    $ ./gradlew processAot
    ...
    
    $ ./gradlew processTestAot 
    ... 
    

    After that, everything works fine.