I’m using Spring Boot Cloud Native Buildpacks with Maven to build container images. According to the documentation, I can configure build options in pom.xml
like this:
<project>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<env>
<BP_LOG_LEVEL>DEBUG</BP_LOG_LEVEL>
</env>
</image>
</configuration>
</plugin>
</plugins>
</build>
</project>
However, I prefer to specify these arguments via the command line when building my project with ./mvnw spring-boot:build-image -Pnative
. This is because the build options might vary depending on the environment or CI/CD pipeline.
Is there a way to pass these Buildpacks arguments directly via the command line instead of relying on pom.xml
?
I’ve explored the documentation but couldn’t find a clear example or parameter for doing this directly through Maven command line options. Any help or guidance on how to achieve this would be greatly appreciated!
Additionally, I want to experiment with different recommendations mentioned in GraalVM to see how they impact the build time of my image. How can I integrate GraalVM recommendations into the Maven build process for Spring Boot applications using Cloud Native Buildpacks via command line?