瀏覽代碼

SONAR-16283 Add redirect for new page Scanner Environment

updated scanner-environment to put back the links for JDK and Tool Environment Plugin for Jenkins.
tags/9.5.0.56709
Megan Wilson 2 年之前
父節點
當前提交
2e251c1d86
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      server/sonar-docs/src/pages/setup/scanner-environment.md

+ 2
- 2
server/sonar-docs/src/pages/setup/scanner-environment.md 查看文件



### Jenkins ### Jenkins


You can define a new JDK in **Manage Jenkins > Global Tool Configuration**, if you have the JDK Tool Plugin installed.
You can define a new JDK in **Manage Jenkins > Global Tool Configuration**, if you have the [JDK Tool Plugin](https://plugins.jenkins.io/jdk-tool/) installed.




#### Declarative Pipelines #### Declarative Pipelines
Jenkins does not offer functionality to switch JDKs when using a **Freestyle project** or **Maven project** configuration. Jenkins does not offer functionality to switch JDKs when using a **Freestyle project** or **Maven project** configuration.
To build your project using Java 8, you have to manually set the `JAVA_HOME` variable to Java 11 or 17 when running the analysis. To build your project using Java 8, you have to manually set the `JAVA_HOME` variable to Java 11 or 17 when running the analysis.


To do this use the **Tool Environment Plugin**. This plugin lets expose the location of the JDK you added under **Manage Jenkins > Global Tool Configuration**.
To do this use the [Tool Environment Plugin](https://plugins.jenkins.io/toolenv/). This plugin lets expose the location of the JDK you added under **Manage Jenkins > Global Tool Configuration**.
The location of the JDK can then be used to set the `JAVA_HOME` variable in a post step command, like this: The location of the JDK can then be used to set the `JAVA_HOME` variable in a post step command, like this:


``` ```

Loading…
取消
儲存