Spring Boot: Unable to Build With Gradle - spring-boot

I have created a simple spring-boot application with Java 11. Generated build.gradle file is as follow:
plugins {
id 'java'
id 'org.springframework.boot' version '2.1.3.RELEASE'
}
apply plugin: 'io.spring.dependency-management'
group = 'scratches'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
Upon executing gradlew build --debug the following error occurs:
09:25:19.482 [LIFECYCLE] [org.gradle.internal.logging.progress.ProgressLoggerFactory] > Configure project :
09:25:19.482 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' started
09:25:19.482 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on :
09:25:19.482 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' started
09:25:19.483 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify beforeEvaluate listeners of :'
09:25:19.483 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' completed
09:25:19.485 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'java-11'' started
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' started
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :init'
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' completed
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.build-init to root project 'java-11''
09:25:19.487 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'java-11'' completed
09:25:19.489 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11'' started
09:25:19.495 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' started
09:25:19.496 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :wrapper'
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' completed
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11''
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11'' completed
09:25:19.499 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11'' started
09:25:19.500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' started
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :help'
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' completed
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' started
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :projects'
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' completed
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' started
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :tasks'
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' completed
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' started
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :properties'
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' completed
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' started
09:25:19.503 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencyInsight'
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' completed
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' started
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencies'
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' completed
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' started
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :buildEnvironment'
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' completed
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' started
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :components'
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' completed
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' started
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :model'
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' completed
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' started
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependentComponents'
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' completed
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11''
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11'' completed
09:25:19.507 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'java-11' using build file 'C:\Users\mohdrashidi.mohdzin\Downloads\java-11\build.gradle'.
09:25:19.507 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply script build.gradle to root project 'java-11'' started
09:25:19.514 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for workingDirs, path C:\Users\mohdrashidi.mohdzin\Downloads\java-11\.gradle\5.2.1\vcsMetadata-1\workingDirs.bin, access org.gradle.cache.internal.DefaultCacheAccess#5630d4e
09:25:19.518 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for md-supplier, path C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier\md-supplier.bin, access org.gradle.cache.internal.DefaultCacheAccess#2e1d1d95
09:25:19.518 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier)
09:25:19.521 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier).
09:25:19.522 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier).
09:25:19.540 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for md-rule, path C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule\md-rule.bin, access org.gradle.cache.internal.DefaultCacheAccess#3cf2f8b9
09:25:19.540 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule)
09:25:19.543 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule).
09:25:19.544 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule).
09:25:19.545 [DEBUG] [org.gradle.internal.locking.LockFileReaderWriter] Lockfiles root: C:\Users\mohdrashidi.mohdzin\Downloads\java-11\gradle\dependency-locks
09:25:19.546 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve dependencies of detachedConfiguration1' started
09:25:19.549 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver] Resolving configuration 'detachedConfiguration1'
09:25:19.550 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.ResolvedArtifactCaches] Creating new in-memory cache for repo 'Gradle Central Plugin Repository' [da9e8315a8be71135c1df434dd1d5d54].
09:25:19.551 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder] Visiting configuration unspecified:unspecified:unspecified(detachedConfiguration1).
09:25:19.552 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver] Attempting to resolve component for org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.3.RELEASE using repositories [Gradle Central Plugin Repository]
09:25:19.553 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.553 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.556 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom' started
09:25:19.556 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.556 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP GET: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.557 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
09:25:19.558 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
09:25:19.558 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
09:25:19.558 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 2][route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 20]
09:25:19.559 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://plugins.gradle.org:443
09:25:19.560 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to plugins.gradle.org/104.18.191.9:443
09:25:19.560 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to plugins.gradle.org/104.18.191.9:443 with timeout 30000
09:25:19.600 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1]
09:25:19.601 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
09:25:19.601 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake
09:25:19.689 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-2: Shutdown connection
09:25:19.689 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection discarded
09:25:19.689 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 2][route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
09:25:19.690 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom'
09:25:19.690 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom' completed
09:25:19.697 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder] Flushing resolved configuration data in Binary store in C:\Users\mohdrashidi.mohdzin\AppData\Local\Temp\gradle4127330315613912958.bin. Wrote root 2.
09:25:19.702 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Resolve dependencies of detachedConfiguration1'
09:25:19.703 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve dependencies of detachedConfiguration1' completed
09:25:19.703 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply script build.gradle to root project 'java-11''
09:25:19.704 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply script build.gradle to root project 'java-11'' completed
09:25:19.704 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.197 secs
09:25:19.704 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' started
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify afterEvaluate listeners of :'
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' completed
09:25:19.705 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on :
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure project :'
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' completed
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure build'
09:25:19.706 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure build' completed
09:25:19.707 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
09:25:19.707 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file 'C:\Users\mohdrashidi.mohdzin\Downloads\java-11\build.gradle' line: 8
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Plugin [id: 'org.springframework.boot', version: '2.1.3.RELEASE'] was not found in any of the following sources:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.3.RELEASE')
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Searched in the following repositories:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Gradle Central Plugin Repository
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.711 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
09:25:19.711 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
09:25:19.712 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2s

You need to add:
buildscript {
repositories {
mavenCentral()
}
}
to the top of build.gradle

Related

Gradle to 6.6.1 got Could not receive a message from the daemon

Before I'm using gradle 6.1.1 and springboot 2.2.1 on my windows 10
After upgrade springboot to 2.3.4 Gradle also update to 6.6.1
When run ./gradlew build or other command.
I got "Could not receive a message from the daemon "
Gradle daemon may improve performance see : why_the_daemon
So I don't want to disabled it.(Do not use org.gradle.daemon=false )
I tried gradle 6.3 that's ok. 6.4 or later not work.
Debug logs
> Starting Daemon
ls: 01000431353532002438633231643962382d646664362d343834302d386566362d64646330366462373336363477eacbea35c640d4950f2ea62a2fb2bb0000cfb000000001000000047f0000010037433a5c55736572735c6a6f7631325c2e677261646c655c64
61656d6f6e5c362e362e315c6461656d6f6e2d313535322e6f75742e6c6f67
2020-10-21T11:08:02.992+0800 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: DETACHED
2020-10-21T11:08:02.992+0800 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle build daemon' finished with exit value 0 (state: DETACHED)
2020-10-21T11:08:02.992+0800 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Gradle daemon process is now detached.
2020-10-21T11:08:02.993+0800 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] An attempt to start the daemon took 2.898 secs.
2020-10-21T11:08:02.993+0800 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] Started Gradle daemon DaemonStartupInfo{pid=1552, uid=8c21d9b8-dfd6-4840-8ef6-ddc06db73664, address=[77eacbea-35c6
-40d4-950f-2ea62a2fb2bb port:53168, addresses:[/127.0.0.1]], diagnostics={pid=1552, daemonLog=C:\Users\jov12\.gradle\daemon\6.6.1\daemon-1552.out.log}}
2020-10-21T11:08:02.994+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-10-21T11:08:02.994+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-10-21T11:08:02.995+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-10-21T11:08:02.995+0800 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [77eacbea-35c6-40d4-950f-2ea62a2fb2bb port:53168, addresses:[/127.0.0.1]].
2020-10-21T11:08:02.995+0800 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
2020-10-21T11:08:02.998+0800 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpOutgoingConnector] Connected to address /127.0.0.1:53168.
2020-10-21T11:08:03.009+0800 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Connected to daemon DaemonInfo{pid=1552, address=[77eacbea-35c6-40d4-950f-2ea62a2fb2bb port:53168, addresses:[/127.0.0.1]],
state=Busy, lastBusy=1603249682985, context=DefaultDaemonContext[uid=8c21d9b8-dfd6-4840-8ef6-ddc06db73664,javaHome=D:\libs\java,daemonRegistryDir=C:\Users\jov12\.gradle\daemon,pid=1552,idleTimeout=10800000,prio
rity=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]}. Dispatching request Build{id=13ab225
4-7b84-4c2f-ae21-52ade0f571fc, currentDir=D:\works\zhihuicanyinV3}.
2020-10-21T11:08:03.009+0800 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Build
2020-10-21T11:08:03.011+0800 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] Problem receiving message to the daemon. Performing 'on failure' operation...
2020-10-21T11:08:03.011+0800 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{pid=1552, address=[7
7eacbea-35c6-40d4-950f-2ea62a2fb2bb port:53168, addresses:[/127.0.0.1]], state=Busy, lastBusy=1603249682985, context=DefaultDaemonContext[uid=8c21d9b8-dfd6-4840-8ef6-ddc06db73664,javaHome=D:\libs\java,daemonReg
istryDir=C:\Users\jov12\.gradle\daemon,pid=1552,idleTimeout=10800000,priority=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=GBK,-Duser.country=CN,
-Duser.language=zh,-Duser.variant]}
2020-10-21T11:08:03.011+0800 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Storing daemon stop event with timestamp 1603249683011
2020-10-21T11:08:03.012+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
2020-10-21T11:08:03.012+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-10-21T11:08:03.014+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-10-21T11:08:03.014+0800 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [77eacbea-35c6-40d4-950f-2ea62a2fb2bb port:53168, addresses:[/127.0.0.1]]
2020-10-21T11:08:03.015+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
2020-10-21T11:08:03.015+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-10-21T11:08:03.017+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-10-21T11:08:03.025+0800 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
2020-10-21T11:08:03.026+0800 [LIFECYCLE] [org.gradle.launcher.cli.DebugLoggerWarningAction]
#############################################################################
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Debug level logging will leak security sensitive information!
https://docs.gradle.org/6.6.1/userguide/logging.html#sec:debug_security
#############################################################################
2020-10-21T11:08:03.031+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-10-21T11:08:03.031+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2020-10-21T11:08:03.031+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-10-21T11:08:03.031+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not receive a message from the daemon.
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-10-21T11:08:03.032+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
Thanks a lot.

Cant zip application via gradle

I am creating a deployment script in gradle. I need to zip up my application in order to upload it to s3 and deploy a revision via code deploy. I can manually run zip -r Archive.zip * to achieve this. However when I try to run the same command in gradle I get an error, please see debug log below.
Task:
task zip {
doLast {
exec {
workingDir '.'
commandLine 'zip', '-r', 'Archive.zip', '*'
}
}
}
Log:
13:01:24.961 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
13:01:24.961 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command 'zip'.
13:01:24.987 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
13:01:24.988 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
13:01:24.988 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'zip''
13:01:25.018 [QUIET] [system.out]
13:01:25.018 [QUIET] [system.out] zip error: Nothing to do! (try: zip -r Archive.zip . -i *)
13:01:25.019 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
13:01:25.019 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'zip'' finished with exit value 12 (state: FAILED)
13:01:25.019 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :zip'
13:01:25.019 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
13:01:25.020 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':zip'
13:01:25.020 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :zip'
13:01:25.020 [null] [org.gradle.internal.progress.DefaultBuildOperationExecutor]
13:01:25.020 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :zip' completed
13:01:25.020 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :zip (Thread[Task worker for ':',5,main]) completed. Took 0.063 secs.
13:01:25.020 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.2 completed (1 worker(s) in use)
13:01:25.020 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on root.1.2
13:01:25.020 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on :
13:01:25.020 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.063 secs, idle: 0.002 secs
12:56:42.933 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file '/app/build.gradle' line: 50
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':zip'.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process 'command 'zip'' finished with non-zero exit value 12
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 0s
There's a clear message printed to stdout in your logs:
13:01:25.018 [QUIET] [system.out] zip error: Nothing to do! (try: zip
-r Archive.zip . -i *)
Your command is invalid.
Also.. There's no need to run zip manually in gradle. There's a predefined task for that.
The following task resolved my issue:
task zip {
doLast {
exec {
workingDir '.'
commandLine 'zip', '-r', 'Archive.zip', '.'
}
}
}

OFBiz task 'build' not found in root project 'ofbiz-release15.12'

> ➜ ofbiz-release15.12 ./gradlew build --debug
07:49:47.388 [INFO] [org.gradle.BuildLogger] Starting Build
07:49:47.411 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/qk/.gradle
07:49:47.415 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/qk/Documents/workspace-neon/ofbiz-release15.12
07:49:47.418 [DEBUG] [org.gradle.BuildLogger] Settings file: null
07:49:47.422 [DEBUG] [org.gradle.BuildLogger] Build file: null
07:49:47.477 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources.
07:49:47.481 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave.
07:49:47.486 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
07:49:47.498 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
07:49:47.736 [DEBUG] [org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator] No local repository in Settings file defined. Using default path: /Users/qk/.m2/repository
07:49:48.088 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on buildscript class cache for settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle' (/Users/qk/.gradle/caches/2.0/scripts/settings_74ne66nuu6asrd265d84ulhlp3/SettingsScript/buildscript).
07:49:48.092 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
07:49:48.175 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on no_buildscript class cache for settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle' (/Users/qk/.gradle/caches/2.0/scripts/settings_74ne66nuu6asrd265d84ulhlp3/SettingsScript/no_buildscript).
07:49:48.177 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
07:49:48.345 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.843 secs
07:49:48.349 [INFO] [org.gradle.BuildLogger] Settings evaluated using settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle'.
07:49:48.473 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /Users/qk/Documents/workspace-neon/ofbiz-release15.12/gradle.properties
07:49:48.475 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!
07:49:48.478 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /Users/qk/Documents/workspace-neon/ofbiz-release15.12/framework/start/build/gradle.properties
07:49:48.480 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!
07:49:48.484 [INFO] [org.gradle.BuildLogger] Projects loaded. Root project using empty build file.
07:49:48.487 [INFO] [org.gradle.BuildLogger] Included projects: [root project 'ofbiz-parent', project ':ofbiz-start']
07:49:49.344 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'ofbiz-parent' using empty build file.
07:49:49.385 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.038 secs
07:49:49.433 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating project ':ofbiz-start' using empty build file.
07:49:49.452 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.017 secs
07:49:49.456 [INFO] [org.gradle.BuildLogger] All projects evaluated.
07:49:49.501 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.504 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
07:49:49.507 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.508 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
07:49:49.512 [ERROR] [org.gradle.BuildExceptionReporter] Task 'build' not found in root project 'ofbiz-parent'.
07:49:49.515 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.530 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
07:49:49.532 [ERROR] [org.gradle.BuildExceptionReporter] Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace.
07:49:49.535 [LIFECYCLE] [org.gradle.BuildResultLogger]
07:49:49.539 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
07:49:49.546 [LIFECYCLE] [org.gradle.BuildResultLogger]
07:49:49.549 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 3.664 secs
It is my first time using gradle and in ofbiz-release15.12 use gradlew to start the demo. It seems that all the tasks do not exist. I have /gradlew init build successful. How can I add the build task?
In OFBiz, Gradle has replaced Ant after the creation of the 15.12 branch.
In 15.12 you still have to use ant to build the system.
You can run:
./ant build
or you can get the list of tasks with:
./ant -p

Project exclude with gradle / sonar / Jacoco

So we have a build with 90+ sub-projects where it's often the case that the directory doesn't perfectly match the project name. In some cases we have empty project-less parent directories and in others the name just doesn't match the directory structure. For example, the sub-directory for project abc-toaster might be named just toaster. The error is:
The base directory of the module ':commons:thingamajig' does not exist:/dev/abc/:commons:thingamajig
...except there is no build.gradle in commons/thingamajig
How can I get Sonar around this? I've tried:
Putting an empty dummy build.gradle in commons/thingamajig - No dice. Same error.
Setting someModule.sonar.projectBaseDir as mentioned here: Sonar properties files
Running a full debug trace to see what pops up. Result: Nothing obvious.
Where am I hosing this up?
Example Update:
allprojects {
sonarqube {
file("$buildDir/classes").mkdirs();
properties {
property "sonar.exclusions", ["**/generated-src/**"]
property "sonar.projectName", "ABC"
property "sonar.projectKey", "$project.group:$project.name"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
property "sonar.projectBaseDir", "${project.rootDir}"
}
}
}
The above gives:
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.batch.scan.ProjectLock
...
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
...
Caused by: java.lang.IllegalStateException: The base directory of the module ':commons:thingamajig' does not exist: /dev/abc/:commons:thingamajig
Another update:
So I've figured out how to exclude projects that don't actually have any Java in them but get picked up by the Java plugin anyway. This has helped but I'm not out of the woods yet. I've also added this in an attempt to get the real value of the project's directory:
subprojects {
sonarqube {
println "*************"
println "$project.name"
properties.each {
println "$it.key, $it.value"
}
println "Project Dir: $projectDir"
println "Project Dir: $project.projectDir"
println "*************"
}
}
More on this in a bit.... OK... here is some debug level stuff:
15:49:31.419 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':sonarqube'.
15:49:31.512 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Extract sonar-scanner-api-batch in temp...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap index...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Download: http://localhost:9000/batch_bootstrap/index
15:49:31.518 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap completed
15:49:31.519 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Create isolated classloader...
15:49:31.520 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Start temp cleaning...
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Temp cleaning done
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:31.522 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution start
15:49:31.607 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Publish global mode
15:49:31.639 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] cache: /home/user/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/global
15:49:31.653 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories
15:49:31.730 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/batch/global | time=75ms
15:49:31.761 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories (done) | time=109ms
15:49:31.778 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:32.035 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index
15:49:32.036 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/deploy/plugins/index.txt | time=1ms
15:49:32.037 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index (done) | time=2ms
15:49:32.037 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins
15:49:32.041 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins (done) | time=4ms
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Plugins:
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * C# 4.4 (csharp)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Java 3.10 (java)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * SVN 1.2 (scmsvn)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Git 1.0 (scmgit)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * JavaScript 2.10 (javascript)
15:49:32.099 [INFO] [org.sonarqube.gradle.SonarQubeTask] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Work directory: /development/eas/build/sonar
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution execute
15:49:32.237 [INFO] [org.sonarqube.gradle.SonarQubeTask] Process project properties
15:49:32.244 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':sonarqube'
15:49:32.244 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :sonarqube FAILED
15:49:32.244 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :sonarqube (Thread[Daemon worker Thread 22,5,main]) completed. Took 5.151 secs.
15:49:32.244 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 22,5,main]] finished, busy: 24.352 secs, idle: 0.053 secs
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarqube'.
Could be a missing or incorrect property if I'm reading this correctly. Is there a better way for me to dump these so I can check em?
OK, figured that out too:
gradle sonarqube -DsonarRunner.dumpToFile=out.properties
Nothing obvious in there though. I see where the project is failing but the value set for the base directory seems correct.
OK here is something really weird. If I run the above, I get:
BUILD SUCCESSFUL
...especially since it was not successful as far as I can tell.
OK I just found these and I've updated the debug level stuff:
property "sonar.verbose", "true"
property "sonar.log.level", "TRACE"
I still don't see anything pertinent there though.
sonarqube {
properties {
property "sonar.exclusions", "src/AbstractData.java,src/preprocessor/*.java,src/Service.java"
}
}
It's Worked for me, Try

Error in `mvn jgitflow:release-finish` mutli-module build (due to wrong compilation order)

I'm trying to use JGitflow to create a release for my project. Unfortunately, when I run mvn jgitflow:release-finish, I get the following error:
Unable to find resource 'org.jorlib:jorlib-core:jar:1.0' in repository central (http://repo1.maven.org/maven2)
[WARNING] The dependency: org.jorlib:jorlib-core:jar:1.0 can't be resolved but has been found in the reactor.
I'm not sure how to resolve this. First I ran: mvn jgitflow:release-start which reported "Build Successfull". The result looks correct:
jkinable#daedalus:~/workspace/javaIDEA/jORLib/jorlib$ git branch -avv
development 07e4c1f [origin/development: ahead 3] updating poms for 1.1-SNAPSHOT development
master f3240f9 [origin/master] Updated pom.xml
*release/1.0 f3240f9 Updated pom.xml
Next I ran mvn jgitflow:release-finish which fails. It seems that it tries to download jorlib-core-1.0.jar but that is the file it is supposed to compile. Digging deeper into this, I ran mvn jgitflow:release-finish -e -X > ~/mygitflow.log
Here is part of the result:
[INFO] Building JORLib - Parent
[INFO] task-segment: [jgitflow:release-finish] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[DEBUG] org.jorlib:jorlib:pom:1.0-SNAPSHOT (selected for null)
[DEBUG] org.jorlib:jorlib-core:jar:1.0-SNAPSHOT (selected for null)
[DEBUG] junit:junit:jar:4.12:test (selected for test)
[DEBUG] Retrieving parent-POM: org.hamcrest:hamcrest-parent:pom:1.3 for project: null:hamcrest-core:jar:null from the repository.
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:test (selected for test)
[DEBUG] Retrieving parent-POM: org.jgrapht:jgrapht:pom:0.9.0 for project: null:jgrapht-core:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:jgrapht-core
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-ext:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-demo:jar:0.9.0
[DEBUG] xmlunit:xmlunit:jar:1.3:test
[DEBUG] junit:junit:jar:4.10:test
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0:compile (selected for compile)
[DEBUG] Retrieving parent-POM: com.google.guava:guava-parent:pom:14.0.1 for project: null:guava:bundle:null from the repository.
[DEBUG] com.google.guava:guava:jar:14.0.1:compile (selected for compile)
[DEBUG] Retrieving parent-POM: ch.qos.logback:logback-parent:pom:0.9.28 for project: null:logback-classic:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:logback-classic
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28:compile (selected for compile)
[DEBUG] Adding managed dependencies for unknown:logback-core
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] Retrieving parent-POM: org.slf4j:slf4j-parent:pom:1.6.1 for project: org.slf4j:slf4j-api:jar:null from the repository.
[DEBUG] Adding managed dependencies for org.slf4j:slf4j-api
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] org.slf4j:slf4j-jdk14:jar:1.6.1
[DEBUG] log4j:log4j:jar:1.2.16
[DEBUG] ch.qos.cal10n:cal10n-api:jar:0.7.4
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] WARNING: A dependency of the current project (or of one the plugins used in its build) was found in the reactor,
but had not been built at the time it was requested. It will be resolved from the repository instead.
Current Project: JORLib - Demo
Requested Dependency: org.jorlib:jorlib-core:jar:1.0-SNAPSHOT
NOTE: You may need to run this build to the 'compile' lifecycle phase, or farther, in order to build the dependency artifact.
The module jorlib-demo depends on jorlib-core, so it must first compile jorlib-core before it compiles jorlib-demo. For some reason this doesn't happen. As a result, it searches for jorlib-core in some external depository and fails eventually because it couldn't find it.
My parent pom: parent pom
The pom in jorlib-core: pom jorlib-core
The pom in jorlib-demo: pom jorlib-demo
It turns out that this problem is caused by my Maven version. My system runs Java 1.8.0_45 and Apache Maven 2.2.1 (rdebian-8). At the time of writing, the latter Maven version is shipped by default with the latest Ubuntu LTS (14.04.2) release. I have now upgraded to Apache Maven 3.2.1. After upgrading to Maven 3, I did run into the following error message while executing jgitflow:release-finish:
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/java-8-oracle/bin/java/bin/java
This effectively prohibited the code from being compiled. Notice the weird bin/java/bin/java part. I double checked my $JAVA_HOME which correctly pointed to /usr/lib/jvm/java-8-oracle/. A solution to this issue can be found here: Having JAVA_HOME inconsistency issue with maven
I simply created a file called .mavenrc in my home folder which contained: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Now the Jgitflow plugin is working well.

Resources