声纳赛跑者孵化声纳插件

时间:2014-04-30 13:55:40

标签: gradle sonarqube

使用带有gradle的Sonar 4.2(启动并运行)(测试版本1.11和1.12)配置了声纳 - 跑步器:

allprojects {
    if (rootProject == project) {
        apply plugin: 'sonar-runner'
        sonarRunner {
            sonarProperties {
                // server props
                property "sonar.host.url", project.ext.hostUrl
                property "sonar.jdbc.url", project.ext.jdbcUrl
                property "sonar.jdbc.driverClassName", project.ext.jdbcDriverClassName
                property "sonar.jdbc.username", project.ext.jdbcUsername
                property "sonar.jdbc.password", project.ext.jdbcPassword

                // project label props
                property "sonar.projectName", project.name
                property "sonar.projectVersion", project.version

            }
        }
    }
}

启动gradle sonarRunner会在下面生成错误。

  FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':sonarRunner'.
    > No such property: reports for class: java.lang.Boolean

我是否必须设置特定的报告参数? (它没有在gradle doc中报告)

调试标志给出:

] * Exception is:
15:52:09.907 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarRunner'.
15:52:09.907 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
15:52:09.908 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
15:52:09.909 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
15:52:09.909 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
15:52:09.910 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:52:09.911 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
15:52:09.912 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:52:09.912 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
15:52:09.913 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:52:09.914 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
15:52:09.914 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
15:52:09.915 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
15:52:09.916 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
15:52:09.916 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
15:52:09.917 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
15:52:09.918 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
15:52:09.919 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
15:52:09.920 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
15:52:09.921 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
15:52:09.921 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
15:52:09.922 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
15:52:09.922 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
15:52:09.923 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
15:52:09.924 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
15:52:09.924 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
15:52:09.924 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
15:52:09.926 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
15:52:09.927 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
15:52:09.927 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
15:52:09.928 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
15:52:09.929 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
15:52:09.937 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
15:52:09.938 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
15:52:09.938 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
15:52:09.939 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
15:52:09.939 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
15:52:09.940 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
15:52:09.941 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
15:52:09.941 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.Main.doAction(Main.java:46)
15:52:09.942 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
15:52:09.942 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.Main.main(Main.java:37)
15:52:09.943 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
15:52:09.943 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
15:52:09.944 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
15:52:09.944 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: groovy.lang.MissingPropertyException: No such property: reports for class: java.lang.Boolean
15:52:09.945 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin$_addGradleDefaults_closure7.doCall(SonarRunnerPlugin.groovy:187)
15:52:09.946 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:58)
15:52:09.946 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.Actions$FilteredAction.execute(Actions.java:203)
15:52:09.947 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110)
15:52:09.948 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115)
15:52:09.949 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.DefaultDomainObjectCollection.withType(DefaultDomainObjectCollection.java:126)
15:52:09.950 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.DomainObjectCollection$withType.call(Unknown Source)
15:52:09.951 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin.addGradleDefaults(SonarRunnerPlugin.groovy:179)
15:52:09.952 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin.this$2$addGradleDefaults(SonarRunnerPlugin.groovy)
15:52:09.952 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin$this$2$addGradleDefaults.callCurrent(Unknown Source)
15:52:09.953 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin.computeSonarProperties(SonarRunnerPlugin.groovy:134)
15:52:09.963 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunnerPlugin$_apply_closure2_closure12.doCall(SonarRunnerPlugin.groovy:113)
15:52:09.963 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.ConventionAwareHelper$1.getValue(ConventionAwareHelper.java:72)
15:52:09.964 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:136)
15:52:09.964 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:114)
15:52:09.965 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunner_Decorated.getSonarProperties(Unknown Source)
15:52:09.966 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.sonar.runner.SonarRunner.run(SonarRunner.groovy:46)
15:52:09.966 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
15:52:09.967 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
15:52:09.967 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
15:52:09.968 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
15:52:09.969 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
15:52:09.969 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
15:52:09.970 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
15:52:09.970 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
15:52:09.971 [ERROR] [org.gradle.BuildExceptionReporter]    ... 43 more

1 个答案:

答案 0 :(得分:1)

看起来您已在构建脚本中的某处(例如,通过testproject.test = true)引入了名为ext.test = true的项目属性。这与Java插件的test任务以及Sonar Runner插件的期望相冲突。声纳服务器版本无关紧要。