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