New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to create a container from jar #37
Comments
Thank you for the report. We do support creating containers from jar files, but only from the project root at the moment. What is the structure of the directory that spring-boot calls the build from? |
for |
Our buildpacks work with springboot [1] and do support searching in the generated directory for jars [2]. What exactly is your request? Can you provide some sort of code sample and step-by-step instructions on the commands you are trying to run. Thanks! [1] https://github.com/GoogleCloudPlatform/buildpacks/tree/master/builders/testdata/java/springboot-helloworld |
I believe the java/runtime buildpack is at fault here. Even though we look for jars in both maven and gradle output directories in the java/entrypoint buildpack, the java/runtime buildpack does not look for nested jars and opts out, failing the build. |
examples are attached. They are generated from start.spring.io with the latest snapshots only. no other changes are required. In order to run In order to run Both generate the error message |
I have enabled the logging and this is the result. Instructions in the previous comment
|
The Spring Boot plugins for Maven and Gradle will only provide a jar file to the CNB builder when the image-building features are used (e.g. with the
If buildpacks only support detection of jar files in known locations from the project root, then they won't work with Spring Boot's Maven and Gradle plugins. The gist of this issue is to consider adding the ability to detect a Java application from only a jar file as an option in the Google Cloud Platform buildpacks. |
The java/runtime buildpack will currently not pass detection unless the jar file is at application root, however, builds still fail after updating the logic. It looks like Spring Boot runs the build with an exploded jar, which we do not support yet, i.e.
|
Currently, spring-boot supports image customization via maven or gradle in the latest snapshots get
and this is due to spring-boot already build the jar so the builder is not able to detect the jar produced. I think will be nice to have this.
Originally posted by @eddumelendez in #32 (comment)
The text was updated successfully, but these errors were encountered: