while pushing spring boot application on pivotal cloud foundry , app got staged but throw exception of incompatible javabuildpack version.I have three questions
1.with cf buildpacks I got the list of buildpacks but how to figure out the version of java_buildpack present in pcf
2.How to create the custom buildpack as per the java version used in app.
3.How to check the compatibility of java buildpack with our app.
When you run cf buildpacks
it should tell you the buildpack version in the filename column. Something like:
buildpack position enabled locked filename
java_buildpack 1 true false java-buildpack-offline-cflinuxfs2-v4.13.1.zip
So this would be buildpack version 4.13.1.
Basically whatever versions you have uploaded or available in cf buildpacks
are just what an app would choose from if not specifically set. You can specifically set a version in your application manifest though:
---
applications:
- name: myapp-ui
host: myapp-ui
memory: 1G
path: build/libs/myapp-ui-v0.2-gf55cb31.jar
buildpack: 'https://github.com/cloudfoundry/java-buildpack#v3.19.2'
When done this way, the staging will ignore whatever buildpacks are available and will download the specific version from the web. You could also upload the buildpack version you need using a unique name and reference it directly in the manifest:
cf create-buildpack java-buildpack-v3 https://github.com/cloudfoundry/java-buildpack/releases/download/v3.19.2/java-buildpack-v3.19.2.zip 99 --enable
---
applications:
- name: myapp-ui
host: myapp-ui
memory: 1G
path: build/libs/myapp-ui-v0.2-gf55cb31.jar
buildpack: java-buildpack-v3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With