Skip to content
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

Bitbucket pipeline: Error: Java SDK required at JAVA_HOME or in path to compile validation helper #16

Open
ivcho02 opened this issue Jul 12, 2022 · 1 comment

Comments

@ivcho02
Copy link

ivcho02 commented Jul 12, 2022

Hi team,
Hope that you are well!

I am trying to use this validator on a Bitbucket pipeline, but unfortunately, the build ends with the following error:

Error: Java SDK required at JAVA_HOME or in path to compile validation helper

Docker image is: node:10.15.3

I couldn't find a way to install java on the Bitbucket virtual machine. The error is thrown on the npm ci step when this dependency is tried to be installed.

Do you have any ideas on how to install java-sdk from the bitbucket-pipeline.yml file?

ps.
It's working perfectly on my machine (I have java-sdk installed on my computer)

Kind Regards,
Ivo

@ivcho02
Copy link
Author

ivcho02 commented Jul 19, 2022

Hi team,
I found a solution without changing the docker image:

bitbucket-pipelines.yml

Before npm install put this:

        script:
          # Install Java SDK because XML validation tool requires it
          - apt-get update
          - apt-get install software-properties-common -y
          - add-apt-repository ppa:openjdk/ppa
          - apt-get install openjdk-8-jdk -y
          - npm ci

Hope it helps.

Best Regards,
Ivo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant