引起:org.sonar.api.utils.SonarException:没有objc

时间:2016-01-12 11:10:14

标签: macos sonarqube

我正在尝试在我的Mac上为我的XCode项目设置Sonar qube。 我已完成设置并尝试执行sonar-runner命令。我收到错误Caused by: org.sonar.api.utils.SonarException: No license for objc 下面是stacktrace:

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: -----------------------------------------------------------------                                    -------
Total time: 2.692s
Final Memory: 12M/301M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
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.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: org.sonar.api.utils.SonarException: No license for objc
at com.A.A.A.B.B.A(Unknown Source)
at com.A.A.A.B.B.A(Unknown Source)
at com.A.A.A.B.H.A(Unknown Source)
at com.A.A.A.B.H.A(Unknown Source)
at com.A.A.A.B.I.B(Unknown Source)
at com.A.A.A.B.I.onSensorsPhase(Unknown Source)
at org.sonar.batch.phases.SensorsPhaseEvent.dispatch(SensorsPhaseEvent.java:44)
at org.sonar.batch.phases.SensorsPhaseEvent.dispatch(SensorsPhaseEvent.java:27)
at org.sonar.batch.events.EventBus.doFireEvent(EventBus.java:49)
at org.sonar.batch.events.EventBus.fireEvent(EventBus.java:43)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:47)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:258)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:253)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.bootstrap.GlobalContainer.executeAnalysis(GlobalContainer.java:153)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:110)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more

任何帮助?

1 个答案:

答案 0 :(得分:1)

您显然在项目中安装了C / C ++,Objective-C插件,,您有.m个文件。由于C-Family插件将.m文件注册为属于Objective-C语言,并且这些文件包含在分析中,因此您本身就在尝试使用您没有许可证的功能。您需要执行以下操作之一:

  • 获得许可
  • 从SonarQube实例中删除插件并重新启动它
  • 从项目中删除.m个文件
  • 从映射到Objective-C的扩展名中删除.m(管理>常规设置> C / C ++ / Objective-C> Objective-C> Objective-C文件后缀)。由于.m是默认值;你必须通过填写废话来实现这一目标。