Maven scan control load plugins

Must-share information (formatted with Markdown):

  • SonarQube 8.6
  • sonar-maven-plugin:3.6.0.1398

Is there any way to control load or not load plugin when scanning by maven ?
project scanned is built by jdk8 and I have to scan it use jdk11, because cxx plugin v2.0.x [GitHub - SonarOpenCommunity/sonar-cxx: SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.] need to jdk11 runtime, I have used “sonar.java.jdkHome”. so is there any way to control not load cxx plugin when scan java project ?

error info:

 [ERROR] Failed to execute goal on project xxx-project: 
Could not resolve dependencies for project net.xxx:xx-project:jar:1.0-SNAPSHOT: 
The following artifacts could not be resolved: jdk.tools:jdk.tools:jar:1.6, net.xxx:xxx-project-api:jar:1.0-SNAPSHOT: 
Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /home/xxx/openjdk-11.0.1/../lib/tools.jar -> [Help 1]

scan command

 mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar \
        -Dsonar.host.url=http://xxx:9000 \
        -Dsonar.login=xxx \
        -Dsonar.projectKey=xxx \
        -Dsonar.projectName=xxx \
        -Dsonar.projectVersion=1 \
        -Dsonar.working.directory=.scannerwork \
        -Dsonar.java.jdkHome=/home/xxx/openjdk-1.8.0.362.b08 \
        -Dmaven.test.skip=true

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.5 → 8.9.10 → 9.9 → 10.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann

Thanks for your help I`ll try to upgrade sonarqube and retry

1 Like