Failed to run hilla:build-frontend goal on CI/CD

When i run mvn clean package -Pproduction via CI/CD the error appears:

Failed to execute goal dev.hilla:hilla-maven-plugin:2.2.0:build-frontend (frontend) on project tasha: Could not execute build-frontend goal: Failed to configure Hilla engine: Command failed with exit code 1: ./mvnw → [Help 1]

I’ve already tried running it in DEBUG, but what appears is this:

[INFO] Configure Hilla engine using build system plugin
[DEBUG] Testing command ./mvnw with arguments [-v]
[DEBUG] Running command ./mvnw
[ERROR] Unknown lifecycle phase "/root/.m2". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:43 min
[INFO] Finished at: 2023-10-08T18:20:46Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal dev.hilla:hilla-maven-plugin:2.2.0:build-frontend (frontend) on project tasha: Could not execute build-frontend goal: Failed to configure Hilla engine: Command failed with exit code 1: ./mvnw -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal dev.hilla:hilla-maven-plugin:2.2.0:build-frontend (frontend) on project tasha: Could not execute build-frontend goal
/// ...
Caused by: org.apache.maven.plugin.MojoFailureException: Could not execute build-frontend goal

CICD: Jetbrains Space (.space.kts)
Docker image: maven:3-openjdk-17-slim
Hilla version: 2.2.0

can anyone help me?

If you have a mvnw wrapper in your repo → remove it, it takes precedence over the maven installed in the CI and probably fails cause of root user usage