How to use sonarqube5 3 analyze java code
•
Java
The following error was given when analyzing the code
Retrieve remote issues of project newsonarproject... Project not found on remote SonarQube server [XXXX:newsonarproject] Start SonarQube analysis on newsonarproject... INFO: SonarQube Server 5.3 Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) at java.security.AccessController.doPrivileged(Native Method) at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at org.sonar.runner.impl.BatchLauncherMain.execute(BatchLauncherMain.java:41) at org.sonar.runner.impl.BatchLauncherMain.main(BatchLauncherMain.java:59) Caused by: java.lang.IllegalStateException: Invalid analysis mode: incremental. This mode was removed in SonarQube 5.2. Valid modes are: [preview,publish,issues] at org.sonar.batch.bootstrap.AbstractAnalysisMode.validate(AbstractAnalysisMode.java:59) at org.sonar.batch.bootstrap.GlobalMode.<init>(GlobalMode.java:33) at org.sonar.batch.bootstrap.GlobalContainer.doBeforeStart(GlobalContainer.java:65) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:130) at org.sonar.batch.bootstrapper.Batch.start(Batch.java:103) at org.sonar.batch.bootstrapper.Batch.start(Batch.java:92) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:76) at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(UnkNown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnkNown Source) at java.lang.reflect.Method.invoke(UnkNown Source) at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) ... 6 more
If anyone knows this, please help me Thank you in advance
Solution
Click preferences in window - > eclipse, find sonarqube, and select the "force full preview instead of incremental analysis" box Then you can run sonarqube again without errors
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码