Gradle Project Scan - Task 'sonarqube' not found in root project "****" in Linux

Hi,

I’m using SonarQube 9.3 and the Kotlin Gradle plugin 3.3. This is hosted on a GitLab server and sitting on Linux.

I’ve gone through and configured the SonarQube plugin according to the steps explained on SonarQube server, except the section:

plugins {
id “org.sonarqube” version “3.3”
}

That breaks the compile phase of the build. But when I run the GitLab CI/CD Pipeline, it gets to the sonarqube scanning under testing and I get the error that - Task ‘sonarqube’ not found in root project “test”. I haven’t seen a recent resolution posted about this since 2017 which seems that sonarqube was configured much differently back then. I was wondering if I could get some help on this issue?

Thanks in advance,

Scott

Hi Scott,

You need to add sonarqube plugin to your project, as you did with that section, to be able to use the sonarqube task.
How did it break the compile phase of the build?

It broke this…

The problem seems to be related to your gradle configuration and not specifically to the sonarqube plugin.

What version of gradle are you using? Could you add -d to gradle’s command to see if there’s any network issue downloading the plugin?

We’re using Gradle 4.10.3.

Which file am I adding the -d in? The .gitlab-ci.yml under sonarqube-check on the script line?

Or during compile with the “gradle assemble” line?

Figured out where to put the -d. This is the tail end of the debug output.

I was looking for logs where it tries to download the plugin from the plugin repository, which should be further up in the logs.

These: 16:15:04.763 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file ‘/builds/ONYX/sas/si/siBackEnd_VM/si/build.gradle’ line: 30
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Plugin [id: ‘org.sonarqube’, version: ‘3.3’] was not found in any of the following sources:
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Plugin Repositories (could not resolve plugin artifact ‘org.sonarqube:org.sonarqube.gradle.plugin:3.3’)
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Searched in the following repositories:
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] maven(https://cl-artifactory2:443/libs-release)
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] maven2(https://cl-artifactory2:443/libs-snapshot)
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
16:15:04.764 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
16:15:04.765 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 3s
16:15:04.916 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file ‘/builds/ONYX/sas/si/siBackEnd_VM/si/build.gradle’ line: 30
Plugin [id: ‘org.sonarqube’, version: ‘3.3’] was not found in any of the following sources:

It looks like you have custom plugin repositories configured?
Do you have a pluginManagement block in any of the gradle settings file?

Yes, in the settings.gradle.

pluginManagement {
    repositories {
//        gradlePluginPortal()
        maven {
            credentials {
                username = "${artifactoryUser}"
                password = "${artifactoryPassword}"
            }
            url 'https://cl-artifactory2:443/libs-release'
        }
        maven {
            credentials {
                username = "${artifactoryUser}"
                password = "${artifactoryPassword}"
            }
            url 'https://cl-artifactory2:443/libs-snapshot'
        }
    }
}
rootProject.name = 'si'

What should I put in here?

You need to remove the comment for gradlePluginPortal().

That worked, it got past the Build Phase this time.

But I still have the same error again…
Task ‘sonarqube’ not found in root project ‘si’.

45* Try:

46Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Where do I put the --stacktrace option, on the .gitlab-ci.yml filr next to gradle sonarqube?

Do you have the plugins block in the root build.gradle of si?

plugins {
  id “org.sonarqube” version “3.3”
}

Once the plugin is applied to the project, the plugin should create the sonarqube task. If that doesn’t happen check the debug logs for any relevant info.

Yes, I do have the plugin in the build.gradle file.

What do I change in the config files to get the debug setting to work?

Do I need this entry in build.gradle?

apply plugin: 'org.sonarqube'

Run the gradle command with -d to get debug logs.

You shouldn’t need apply plugin.

I think I might have some ideas on what might be wrong.

We have the .gitlab-ci.yml file at the root folder, si. Also, I have a sonar-project.properties file at that level. I don’t think it’s being read because I commented it all out. It was an old file.

Now, two levels below that there is the gradle files, build.gradle, gradle.properties, settings.gradle. Could that be an issue? It doesn’t help that those two folders are both named si.

20:44:41.460 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
20:44:41.461 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: Gradle build daemon.
20:44:41.514 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
20:44:41.515 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
20:44:41.515 [DEBUG] [org.gradle.launcher.daemon.bootstrap.DaemonOutputConsumer] Starting consuming the daemon process output.
20:44:41.516 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'Gradle build daemon'
20:44:41.516 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Gradle daemon process is starting. Waiting for the daemon to detach...
20:44:42.169 [DEBUG] [org.gradle.launcher.daemon.bootstrap.DaemonOutputConsumer] daemon out: Daemon started. About to close the streams. Daemon details: 0100023438002432633266636636342d393165322d346434652d623665642d3339303135613664346431399cd24829260840f795a3af9ccabfaca60000b091000000020000001000000000000000000000000000000001000000047f00000100332f686f6d652f677261646c652f2e677261646c652f6461656d6f6e2f352e342e312f6461656d6f6e2d34382e6f75742e6c6f67
20:44:42.171 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: DETACHED
20:44:42.171 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle build daemon' finished with exit value 0 (state: DETACHED)
20:44:42.171 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Gradle daemon process is now detached.
20:44:42.176 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] An attempt to start the daemon took 0.726 secs.
20:44:42.177 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] Started Gradle daemon DaemonStartupInfo{pid=48, uid=2c2fcf64-91e2-4d4e-b6ed-39015a6d4d19, address=[9cd24829-2608-40f7-95a3-af9ccabfaca6 port:45201, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], diagnostics={pid=48, daemonLog=/home/gradle/.gradle/daemon/5.4.1/daemon-48.out.log}}
20:44:42.177 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
20:44:42.177 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
20:44:42.178 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
20:44:42.179 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [9cd24829-2608-40f7-95a3-af9ccabfaca6 port:45201, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]].
20:44:42.179 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1.
20:44:42.183 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Connected to address /0:0:0:0:0:0:0:1:45201.
20:44:42.190 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Connected to daemon DaemonInfo{pid=48, address=[9cd24829-2608-40f7-95a3-af9ccabfaca6 port:45201, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Busy, lastBusy=1646253882163, context=DefaultDaemonContext[uid=2c2fcf64-91e2-4d4e-b6ed-39015a6d4d19,javaHome=/usr/lib/jvm/java-11-openjdk-amd64,daemonRegistryDir=/home/gradle/.gradle/daemon,pid=48,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=debefb47-443c-46ce-920c-98b593dd6520, currentDir=/builds/OX/sas/si}.
20:44:42.190 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Build
20:44:42.220 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result org.gradle.launcher.daemon.protocol.BuildStarted@6ea2bc93 from daemon DaemonInfo{pid=48, address=[9cd24829-2608-40f7-95a3-af9ccabfaca6 port:45201, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Busy, lastBusy=1646253882163, context=DefaultDaemonContext[uid=2c2fcf64-91e2-4d4e-b6ed-39015a6d4d19,javaHome=/usr/lib/jvm/java-11-openjdk-amd64,daemonRegistryDir=/home/gradle/.gradle/daemon,pid=48,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country,-Duser.language=en,-Duser.variant]} (build should be starting).
20:44:42.223 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@af02083
20:44:42.223 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 19: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
20:44:42.232 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 48). The daemon log file: /home/gradle/.gradle/daemon/5.4.1/daemon-48.out.log
20:44:42.234 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting build in new daemon [memory: 536.9 MB]
20:44:42.235 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] Closing daemon's stdin at end of input.
20:44:42.235 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] The daemon will no longer process any standard input.
20:44:42.240 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
20:44:42.241 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=2c2fcf64-91e2-4d4e-b6ed-39015a6d4d19,javaHome=/usr/lib/jvm/java-11-openjdk-amd64,daemonRegistryDir=/home/gradle/.gradle/daemon,pid=48,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country,-Duser.language=en,-Duser.variant]
20:44:42.323 [INFO] [org.gradle.internal.work.DefaultWorkerLeaseService] Using 4 worker leases.
20:44:42.364 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for fileHashes, path /home/gradle/.gradle/caches/5.4.1/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@e9056fc
20:44:42.369 [DEBUG] [org.gradle.cache.internal.InMemoryCacheDecoratorFactory] Creating in-memory store for cache /home/gradle/.gradle/caches/5.4.1/fileHashes/fileHashes.bin (max size: 190500)
20:44:42.370 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for file hash cache (/home/gradle/.gradle/caches/5.4.1/fileHashes)
20:44:42.372 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on file hash cache (/home/gradle/.gradle/caches/5.4.1/fileHashes).
20:44:42.374 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on file hash cache (/home/gradle/.gradle/caches/5.4.1/fileHashes).
20:44:42.375 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for file-access, path /home/gradle/.gradle/caches/journal-1/file-access.bin, access org.gradle.cache.internal.DefaultCacheAccess@374c1fa4
20:44:42.375 [DEBUG] [org.gradle.cache.internal.InMemoryCacheDecoratorFactory] Creating in-memory store for cache /home/gradle/.gradle/caches/journal-1/file-access.bin (max size: 400)
20:44:42.375 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for journal cache (/home/gradle/.gradle/caches/journal-1)
20:44:42.376 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on journal cache (/home/gradle/.gradle/caches/journal-1).
20:44:42.377 [DEBUG] [org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler] Starting file lock listener thread.
20:44:42.379 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on journal cache (/home/gradle/.gradle/caches/journal-1).
20:44:42.443 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for resourceHashesCache, path /home/gradle/.gradle/caches/5.4.1/fileHashes/resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@e9056fc
20:44:42.443 [DEBUG] [org.gradle.cache.internal.InMemoryCacheDecoratorFactory] Creating in-memory store for cache /home/gradle/.gradle/caches/5.4.1/fileHashes/resourceHashesCache.bin (max size: 190500)
20:44:42.605 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for fileHashes, path /builds/OX/sas/si/.gradle/5.4.1/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@3292071b
20:44:42.606 [DEBUG] [org.gradle.cache.internal.InMemoryCacheDecoratorFactory] Creating in-memory store for cache /builds/OX/sas/si/.gradle/5.4.1/fileHashes/fileHashes.bin (max size: 190500)
20:44:42.606 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for file hash cache (/builds/OX/sas/si/.gradle/5.4.1/fileHashes)
20:44:42.606 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on file hash cache (/builds/OX/sas/si/.gradle/5.4.1/fileHashes).
20:44:42.609 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on file hash cache (/builds/OX/sas/si/.gradle/5.4.1/fileHashes).
20:44:42.709 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run build' started
20:44:42.724 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 started (1 worker(s) in use).
20:44:42.724 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on root.1
20:44:42.725 [INFO] [org.gradle.internal.buildevents.BuildLogger] Starting Build
20:44:42.725 [DEBUG] [org.gradle.internal.buildevents.BuildLogger] Gradle user home: /home/gradle/.gradle
20:44:42.725 [DEBUG] [org.gradle.internal.buildevents.BuildLogger] Current dir: /builds/OX/sas/si
20:44:42.725 [DEBUG] [org.gradle.internal.buildevents.BuildLogger] Settings file: null
20:44:42.725 [DEBUG] [org.gradle.internal.buildevents.BuildLogger] Build file: null
20:44:42.727 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Load build' started
20:44:42.728 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave.
20:44:42.729 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Evaluate settings' started
20:44:42.729 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
20:44:42.730 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
20:44:43.060 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.329 secs
20:44:43.060 [INFO] [org.gradle.internal.buildevents.BuildLogger] Settings evaluated using settings file '/builds/OX/sas/si/settings.gradle'.
20:44:43.064 [DEBUG] [org.gradle.caching.configuration.internal.DefaultBuildCacheConfiguration] Found class org.gradle.caching.local.internal.DirectoryBuildCacheServiceFactory registered for class org.gradle.caching.local.DirectoryBuildCache
20:44:43.068 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Finalize build cache configuration' started
20:44:43.069 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Finalize build cache configuration'
20:44:43.070 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Finalize build cache configuration' completed
20:44:43.070 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Evaluate settings'
20:44:43.070 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Evaluate settings' completed
20:44:43.075 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Load build'
20:44:43.075 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Load build' completed
20:44:43.076 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure build' started
20:44:43.077 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Load projects' started
20:44:43.163 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project : - Transitioning model element '<root>' from state Registered to Created
20:44:43.166 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project : - Transitioning model element '<root>' to state Discovered.
20:44:43.167 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project : - Transitioning model element '<root>' to state Created.
20:44:43.216 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /builds/OX/sas/si/gradle.properties
20:44:43.216 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!
20:44:43.218 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Load projects'
20:44:43.218 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Load projects' completed
20:44:43.219 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify projectsLoaded listeners' started
20:44:43.219 [INFO] [org.gradle.internal.buildevents.BuildLogger] Projects loaded. Root project using build file '/builds/OX/sas/si/build.gradle'.
20:44:43.219 [INFO] [org.gradle.internal.buildevents.BuildLogger] Included projects: [root project 'si']
20:44:43.220 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute 'rootProject {}' action' started
20:44:43.221 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on :
20:44:43.222 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Cross-configure project :' started
20:44:43.222 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Cross-configure project :'
20:44:43.222 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Cross-configure project :' completed
20:44:43.223 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on :
20:44:43.224 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute 'rootProject {}' action'
20:44:43.224 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute 'rootProject {}' action' completed
20:44:43.224 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify projectsLoaded listeners'
20:44:43.224 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify projectsLoaded listeners' completed
20:44:43.229 [LIFECYCLE] [org.gradle.internal.logging.progress.ProgressLoggerFactory] 
20:44:43.229 [LIFECYCLE] [org.gradle.internal.logging.progress.ProgressLoggerFactory] > Configure project :
20:44:43.229 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' started
20:44:43.229 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on :
20:44:43.230 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' started
20:44:43.231 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify beforeEvaluate listeners of :'
20:44:43.231 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' completed
20:44:43.270 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :prepareKotlinBuildScriptModel' started
20:44:43.287 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :prepareKotlinBuildScriptModel'
20:44:43.287 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :prepareKotlinBuildScriptModel' completed
20:44:43.298 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'si'' started
20:44:43.303 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' started
20:44:43.304 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :init'
20:44:43.304 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' completed
20:44:43.305 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.build-init to root project 'si''
20:44:43.305 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'si'' completed
20:44:43.306 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'si'' started
20:44:43.308 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' started
20:44:43.308 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :wrapper'
20:44:43.308 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' completed
20:44:43.308 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.wrapper to root project 'si''
20:44:43.308 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'si'' completed
20:44:43.311 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'si'' started
20:44:43.312 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' started
20:44:43.312 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :help'
20:44:43.313 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' completed
20:44:43.313 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' started
20:44:43.313 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :projects'
20:44:43.314 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' completed
20:44:43.314 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' started
20:44:43.314 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :tasks'
20:44:43.314 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' completed
20:44:43.315 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' started
20:44:43.315 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :properties'
20:44:43.315 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' completed
20:44:43.320 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' started
20:44:43.320 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencyInsight'
20:44:43.320 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' completed
20:44:43.321 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' started
20:44:43.321 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencies'
20:44:43.321 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' completed
20:44:43.321 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' started
20:44:43.322 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :buildEnvironment'
20:44:43.322 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' completed
20:44:43.322 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' started
20:44:43.322 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :components'
20:44:43.322 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' completed
20:44:43.323 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' started
20:44:43.323 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :model'
20:44:43.323 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' completed
20:44:43.324 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' started
20:44:43.324 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependentComponents'
20:44:43.324 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' completed
20:44:43.324 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.help-tasks to root project 'si''
20:44:43.324 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'si'' completed
20:44:43.324 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'si' using build file '/builds/OX/sas/si/build.gradle'.
20:44:43.327 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.003 secs
20:44:43.329 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' started
20:44:43.329 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify afterEvaluate listeners of :'
20:44:43.329 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' completed
20:44:43.330 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on :
20:44:43.330 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure project :'
20:44:43.330 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' completed
20:44:43.331 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify projectsEvaluated listeners' started
20:44:43.331 [INFO] [org.gradle.internal.buildevents.BuildLogger] All projects evaluated.
20:44:43.331 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify projectsEvaluated listeners'
20:44:43.331 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify projectsEvaluated listeners' completed
20:44:43.331 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure build'
20:44:43.331 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure build' completed
20:44:43.332 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Calculate task graph' started
20:44:43.353 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
20:44:43.353 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
20:44:43.353 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
20:44:43.353 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
20:44:43.353 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Task 'sonarqube' not found in root project 'si'.
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
20:44:43.354 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2s
20:44:43.346 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Calculate task graph'
20:44:43.346 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Calculate task graph' completed
20:44:43.350 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
20:44:43.350 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
20:44:43.355 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
20:44:43.355 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run build' completed
20:44:43.380 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
20:44:43.380 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
20:44:43.386 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/builds/OX/sas/si/.gradle/5.4.1/fileHashes)
20:44:43.387 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/builds/OX/sas/si/.gradle/5.4.1/fileHashes).
20:44:43.396 [DEBUG] [org.gradle.cache.internal.VersionSpecificCacheCleanupAction] Processed version-specific caches at /builds/OX/sas/si/.gradle for cleanup in 0.007 secs
20:44:43.399 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
20:44:43.467 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Success[value=org.gradle.launcher.exec.BuildActionResult@58594a11] from daemon DaemonInfo{pid=48, address=[9cd24829-2608-40f7-95a3-af9ccabfaca6 port:45201, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Busy, lastBusy=1646253882163, context=DefaultDaemonContext[uid=2c2fcf64-91e2-4d4e-b6ed-39015a6d4d19,javaHome=/usr/lib/jvm/java-11-openjdk-amd64,daemonRegistryDir=/home/gradle/.gradle/daemon,pid=48,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country,-Duser.language=en,-Duser.variant]} (build should be done).
20:44:43.467 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
20:44:43.467 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
Cleaning up file based variables
00:02
ERROR: Job failed: exit code 1

I could not fit it all in the post.

Figured it out. In the script section, I had to cd to the location of the gradle files like build.gradle, gradle.properties, settings.gradle and run the gradle sonarqube command there.

But now I ran into another error. I’ll stop this post and post the new error.

Thanks,

Scott

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.