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

Iam not really sure is this a bug but with solution (Could not find 'java' executable in JAVA_HOME or PATH.) #31

Closed
alexanderaucobo opened this issue Oct 22, 2021 · 3 comments
Assignees

Comments

@alexanderaucobo
Copy link

alexanderaucobo commented Oct 22, 2021

Issue and Steps to Reproduce

use actions/setup-java@v2
use kitabisa/sonarqube-action@v1.1.1
then this happens:

Could not find 'java' executable in JAVA_HOME or PATH.

Why this happens: It is overwriting the environment variables set in the docker container from sonar-scanner

How to fix it: Set environment variable for this action back to the env variable from the original docker container from sonar-scan ner

  - name: SonarQube Scan
    uses: kitabisa/sonarqube-action@v1.1.1
    env:
      JAVA_HOME: /usr/lib/jvm/java-11-openjdk
    with:
      host: ${{ secrets.SONARQUBE_HOST }}
      login: ${{ secrets.SONARQUBE_TOKEN }}

Have a nice day :-)

@dwisiswant0
Copy link
Member

dwisiswant0 commented Oct 27, 2021

What if you don't use actions/setup-java action? Have you tested this, @alexanderaucobo?

@alexanderaucobo
Copy link
Author

What if you don't use actions/setup-java action? Have you tested this, @alexanderaucobo?

No, I didn't test it without. But I think everything which changes the JAVA_HOME variable will have these effects. And when it is not set then it is using the "internal" variable. But as I mentioned untested @dwisiswant0

@ghost
Copy link

ghost commented Nov 1, 2022

ERROR: Error during SonarScanner execution
org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.

I am facing the above issue could you please share the configuration details? how to set up your lib for spring boot APP.

@alexanderaucobo @dwisiswant0

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

2 participants