Sonar scanner java 17

  • sonar scanner java 17
  • Sonarqube scanner java 17
  • Sonar scanner cli java 17
  • Scanner environment

    A Java runtime environment is always required to run the scanner that performs (CI-based) analysis. This applies to all scanner variants (CLI, CI-specific, etc.)

    js runtime.

    The required versions for these runtimes change with successive versions of the scanner. The current requirements and recommendations are:

    • Java 17 is the minimum recommended version.
    • 20 is the recommended utgåva, the active LTS. 

    Scanner vs project

    The requirements above refer only to the versions of Java and  used by the scanner itself to run.

    Java configuration

    GitHub Actions

    The SonarQube GitHub Action can be configured for different target build technologies (.NET, Gradle, Maven, etc).

    Maven / Gradle

    If your whole Maven or Gradle build doesn't run on Java 17, we suggest first to try to base the whole build on one of those two versions of Java. If it's not compatible, then you can override the environment variable just before the analysis step, as shown here:

    Azure DevOps

    All VM images available in Azure Pipelines for Microsoft-hosted agents already contain Java There fryst vatten no further action required. For self-hosted agents, you must ensure that you

    SonarQube Server support Java 17

    Peapodsec (PeapodSecurity) 1

    Hello,

    What version are we using? SonarQube enterprise Version ; Scanner - java (adopt openjdk)

    We’ve upgraded sonarqube scanner version to Java17(adopt openjdk) and most of our applications are running on Java 8,11,12,

    1. Is sonarqube server support applications running Java 17?
    2. Since we’ve upgraded the scanner to 17, will it support of apps running on Java 8,11,12,17?

    Please let me know

    Thanks.

    ganncamp (G Ann Campbell) 2

    Hi,

    Welcome to the community!

    SonarQube does not support Java neither for running the server / scanner nor for analysis of Java 17 code in projects.

    In SonarQube , Java 17 is supported for running analysis, and parsing of Java 18 code (and 17, too) is also supported.

    Regarding the version of Java your code runs with, as long as you analyze with a supported version of Java, you can compile with or to whatever version of Java you like.


    HTH,
    Ann

    Peapodsec (PeapodSecurity) 3

    Thanks Ann, Is Java 17 on sonarscanner supports projects using Java 9 and under?

    ganncamp (G Ann Campbell) 4

    Hi,

    You can analyze Java if you like as long as you use a supported JVM to r

    SonarScanner

    If you're running SonarQube with Java 11 as scanner runtime environment, the latest compatible SonarScanner version is x. Later SonarScanner versions require Java 17 as runtime environment.

    The SonarScanner is the scanner to use when there is no specific scanner for your build system. The SonarScanner does not support ARM architecture.

    Configuring your project

    Create a configuration file in your project's root directory called .

    Running SonarScanner from the zip file

    To run SonarScanner from the zip file, follow these steps:

    1. Expand the downloaded file into the directory of your choice. We'll refer to it as  in the next steps.
    2. Update the global settings to point to your SonarQube server by editing :

    3. Add the  directory to your path.
    4. Verify your installation by opening a new shell and executing the command  ( on Windows). You should get an output like this:


      If you need more debug information, you can add one of the following to your command line: , , or .
    5. Run the following command from the project base directory to launch analysis and pass your authentication token:

    Running SonarScanner from the Docker image

    To scan using the So

  • sonar scanner java 17