4

在分析代码时,它给出以下错误

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

如果有人知道这件事,请帮助我。提前致谢。

4

1 回答 1

0

在Eclipse中点击Window->Preference,找到SonarQube,勾选“Force full preview instead of incremental analysis”。然后您可以再次运行 SonarQube 并且不会收到错误消息。

于 2016-09-06T06:07:07.767 回答