Hi, I am trying to enable metadataRepository configuration in native-maven-plugin in my app (built with Spring Boot 3.0.0-M5, Spring Cloud 2022.0.0-M4, Java 17). I also have maven-assembly-plugin configured in my pom as I need to create a custom runtime to deploy my app to AWS Lambda since Lambda doesn't yet support Java 17 runtime. Prior to adding native-maven-plugin with metadataRepository enabled, I was able to generate the custom runtime in a zip file and deploy to Lambda. However, after adding native-maven-plugin, my custom runtime build stopped working, it no longer generates the zip file. My source code is located at https://github.com/wenqiglantz/springboot3-webclient/tree/metadata. My github actions workflow run can be found here https://github.com/wenqiglantz/springboot3-webclient/actions/runs/3151692666/jobs/5125968700. The maven command I use in my workflow is mvn -ntp clean package -Pnative -e -X. In my root pom, I have the plugins configured as the following, let me know if there is a misconfiguration?
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>native-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<inherited>false</inherited>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/assembly/native.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.14</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<metadataRepository>
<enabled>true</enabled>
</metadataRepository>
</configuration>
</plugin>
</plugins>
</build>
Comment From: snicoll
@wenqiglantz I don't undertsand why you're reporting this issue here. If you have trouble configuring Maven, please follow the guidelines for contributing and ask your questions on StackOverflow.
FTR that project built fine for me so whatever is happening, please review it and clarify what you mean by "my custom runtime build stopped working, it no longer generates the zip file".
Comment From: wenqiglantz
Thanks @snicoll! There was no error during the build, the problem is with the result of the build. Without adding native-maven-plugin, the build produced the custom runtime properly in the zip file as expected. But after adding native-maven-plugin, the build no longer generates the zip file. I cannot find any guidance/documentation on how to fix it.
Sorry for not following your guideline on submitting questions on StackOverflow, which I had submitted a different question there before and tagged with "spring-boot" but got no response at all.
Comment From: snicoll
@wenqiglantz the native-maven-plugin is not managed by this project. I still don't understand the link with Spring Boot I am afraid. StackOverflow is the right place. Can you share the link to your question?
Comment From: wenqiglantz
@snicoll I have posted my question to StackOverflow, and the link is https://stackoverflow.com/questions/73913634/custom-runtime-issue-with-native-maven-plugin-having-metadatarepository-enabled. Any guidance you or your team can provide is deeply appreciated! Thanks!