dmikusa / binding-tool

Generate Kubernetes service bindings for use with Cloud Native Buildpacks
Apache License 2.0
27 stars 4 forks source link

unable to download file:///bindings/dependency-mapping/binaries/bellsoft-jre8u362+9-linux-amd64.tar.gz #38

Closed ksanjeev9211 closed 1 year ago

ksanjeev9211 commented 1 year ago

I am using spring-boot-maven-plugin after using your build tool which downloads the required binaries. However, I get the above error and I am stuck because of this.

Thanks

dmikusa commented 1 year ago

Are you adding the binding?

See https://stackoverflow.com/a/74406677/1585136

ksanjeev9211 commented 1 year ago

Hi, Thanks for your quick reply. Actually, it was my mistake, I could resolve the issue as there was a path mismatch.

in pom.xml I have configured my spring-boot-maven-plugin to have the following as one of the bindings: <binding>${basedir}/bindings/dependency-mapping:/platform/bindings/dependency-mapping</binding>

However, the binding-tool bt dependency-mapping -t buildpack.toml is creating the file uri as e.g. : file:///bindings/dependency-mapping/binaries/bellsoft-liberica-vm-core-openjdk17.0.6+10-22.3.1+1-linux-amd64.tar.gz

after changing the file uri to match the bindings in pom.xml, the problem was resolved, i.e.

file:///platform/bindings/dependency-mapping/binaries/bellsoft-liberica-vm-core-openjdk17.0.6+10-22.3.1+1-linux-amd64.tar.gz

Regards, Sanjeev

dmikusa commented 1 year ago

Yes, that makes sense. The tool assumes you have SERVICE_BINDING_ROOT=/bindings, which changes that location.

I want to make that configurable but I haven't gotten to it yet. https://github.com/dmikusa/binding-tool/issues/1

I also want to auto-generate the maven/gradle snippets to add. That's also on the roadmap.

Thanks for following up!