运行gradle任务时
gradle clean test jacocoTestReport sonarqube
我收到以下错误:
10:35:16.649 INFO - Install plugins
10:35:16.764 INFO - Install JDBC driver
10:35:16.773 INFO - Create JDBC datasource for jdbc:oracle:thin:@dbserver
:sonarqube FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarqube'.
> Unable to execute Sonar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 9.945 secs
sealing violation: package oracle.jdbc is sealed
我认为这是因为JDBC驱动程序在我的构建过程中预先由另一个插件加载,但插件的文档缺少关闭JDBC驱动程序下载的选项,我找不到插件的问题跟踪器。 / p>
堆栈跟踪是
11:41:47.969 [ERROR] [org.gradle.BuildExceptionReporter]
11:41:47.969 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:41:47.970 [ERROR] [org.gradle.BuildExceptionReporter]
11:41:47.970 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:41:47.970 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarqube'.
11:41:47.970 [ERROR] [org.gradle.BuildExceptionReporter] > Unable to execute Sonar
11:41:47.970 [ERROR] [org.gradle.BuildExceptionReporter]
11:41:47.971 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
11:41:47.972 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
11:41:47.972 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
11:41:47.972 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
11:41:47.972 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
11:41:47.972 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
11:41:47.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
11:41:47.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
11:41:47.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
11:41:47.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
11:41:47.973 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:306)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
11:41:47.974 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
11:41:47.975 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:43)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:30)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:119)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:48)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
11:41:47.976 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.Swapper.swap(Swapper.java:38)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
11:41:47.977 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.sonar.runner.impl.RunnerException: Unable to execute Sonar
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.api.Runner.execute(Runner.java:100)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:50)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
11:41:47.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] ... 57 more
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.IllegalStateException: Fail to connect to database
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:77)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.behaviors.Stored.start(Stored.java:110)
11:41:47.979 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
11:41:47.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
11:41:47.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
11:41:47.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
11:41:47.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Batch.start(Batch.java:81)
11:41:47.980 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] ... 71 more
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:103)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:72)
11:41:47.982 [ERROR] [org.gradle.BuildExceptionReporter] ... 85 more
11:41:47.983 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.SecurityException: sealing violation: package oracle.jdbc is sealed
11:41:47.983 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
11:41:47.983 [ERROR] [org.gradle.BuildExceptionReporter] ... 90 more
11:41:47.983 [ERROR] [org.gradle.BuildExceptionReporter]