Gradle Project build failed - web-services

I am trying to build a RESTful WebService project with gradle tool. But build is failing. The console is giving following output.
C:\Users\bob\Downloads\gs-rest-service-master\gs-rest-service-master\complete>gradle build
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'complete'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC4.
Required by:
:complete:unspecified
> Could not GET 'http://repo.spring.io/libs-snapshot/org/springframework/boot/spring- boot-gradle-plugin/1.0.0.RC4/spring-boot-gradle-plugin-1.0.0.RC4.pom'.
> Connection to http://repo.spring.io refused
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
And when I give the command
gradle build --stacktrace
Getting the following stacktrace:
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC4.
Required by:
:complete:unspecified
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.r esolve(RepositoryChainDependencyResolver.java:72)
at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(Clie ntModuleResolver.java:35)
at org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyResolver.resolv e(ProjectDependencyResolver.java:49)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$AbstractVersionResolveResult.resolve(LazyDependencyToModuleResolver.java:69)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java:655)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder.java:666)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:340)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:314)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:130)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:70)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:116)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:82)
at org.gradle.internal.Transformers$3.transform(Transformers.java:131)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:82)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:42)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:193)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:65)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:45)
at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:55)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:47)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:46)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:240)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:230)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:463)
... 32 more
Caused by: org.gradle.api.internal.externalresource.transport.http.HttpRequestException: Could not GET 'http://repo.spring.io/libs-snapshot/org/springframework/boot/spring-boot-gradle-plugin/1.0.0.RC4/spring-boot-gradle-plugin-1.0.0.RC4.pom'.
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:80)
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:66)
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:70)
at org.gradle.api.internal.externalresource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:46)
at org.gradle.api.internal.externalresource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:32)
at org.gradle.api.internal.externalresource.transfer.ProgressLoggingExternalResourceAccessor.getResource(ProgressLoggingExternalResourceAccessor.java:38)
at org.gradle.api.internal.externalresource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:60)
at org.gradle.api.internal.externalresource.transport.DefaultExternalResourceRepository.getResource(DefaultExternalResourceRepository.java:65)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$ArtifactResolver.getResource(ExternalResourceResolver.java:579)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$ArtifactResolver.findStaticResourceUsingPatterns(ExternalResourceResolver.java:564)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$ArtifactResolver.resolveMetaDataArtifact(ExternalResourceResolver.java:548)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findMetaDataArtifact(ExternalResourceResolver.java:191)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:165)
at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.getDependency(MavenResolver.java:83)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository$2.run(CacheLockingModuleVersionRepository.java:54)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:237)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:308)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:114)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:185)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:57)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository.getDependency(CacheLockingModuleVersionRepository.java:52)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.getDependency(CachingModuleVersionRepository.java:137)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.CachedRepository.getDependency(CachedRepository.java:74)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver$RepositoryResolveState$RemoteModuleAccess.getDependency(RepositoryChainDependencyResolver.java:216)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver$StaticVersionRepositoryResolveState.process(RepositoryChainDependencyResolver.java:228)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver$RepositoryResolveState.resolve(RepositoryChainDependencyResolver.java:182)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.findLatestModule(RepositoryChainDependencyResolver.java:110)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.findLatestModule(RepositoryChainDependencyResolver.java:86)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.resolve(RepositoryChainDependencyResolver.java:61)
... 63 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://repo.spring.io refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:118)
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performHttpRequest(HttpClientHelper.java:111)
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.executeGetOrHead(HttpClientHelper.java:87)
at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:78)
... 92 more
Caused by: java.net.ConnectException: Connection timed out: connect
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
... 101 more
Below is the content of my Build.gradle file
buildscript {
repositories {
maven { url "http://repo.spring.io/libs-snapshot" }
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC4")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("com.fasterxml.jackson.core:jackson-databind")
testCompile("junit:junit")
}
jar {
baseName = 'gs-rest-service'
version = '0.1.0'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
Please help me why the build is failing?? Is that anything to do with Proxy settings?

Ok, for me it works perfectly fine. If You have any proxy this is (was) a known issue. Have a look at setting up gradle's build environment.

Related

JaCoCo fails with "initializationError FAILED"

PS D:\Projects\MyApp> ./gradlew jacocoCoverage
Configuration on demand is an incubating feature.
Task :myLibModule:testDebugUnitTest
com.example.sheets.BottomSheetServiceTest > initializationError FAILED
java.lang.IllegalArgumentException at RobolectricTestRunner.java:260
Caused by: java.lang.IllegalArgumentException at DefaultSdkPicker.java:118
1 test completed, 1 failed
Task :myLibModule:testDebugUnitTest FAILED
FAILURE: Build failed with an exception.#
And the Report:
java.lang.IllegalArgumentException: failed to configure com.example.sheets.BottomSheetServiceTest.showBottomSheetWithOrientationChange: Package targetSdkVersion=32 > maxSdkVersion=31
at org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:260)
JaCoCo version 0.8.7
And the build.gradle for :myLibModule
android {
compileSdkVersion = 32
buildToolsVersion = "32.0.0"
defaultConfig {
minSdkVersion(24)
targetSdkVersion(32)
#..

Building the source code of WSO2 EI 6.5.0

I am trying to build the source code WSO2 EI from https://github.com/wso2/product-ei.git using maven: mvn clean install. But it does not success, there are some bugs as below:
[INFO] Reactor Summary for WSO2 Enterprise Integrator 6.6.0-SNAPSHOT:
[INFO]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project org.wso2.carbon.ei.tests.transport: Failed to clean project: Failed to delete D:\wso2-workspace\TestFromGit\product-ei\integration\mediation-tests\tests-transport\target\jacoco\agent\jacocoagent.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project org.wso2.carbon.ei.tests.transport: Failed to clean project: Failed to delete D:\wso2-workspace\TestFromGit\product-ei\integration\mediation-tests\tests-transport\target\jacoco\agent\jacocoagent.jar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete D:\wso2-workspace\TestFromGit\product-ei\integration\mediation-tests\tests-transport\target\jacoco\agent\jacocoagent.jar
at org.apache.maven.plugin.clean.CleanMojo.execute (CleanMojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.IOException: Failed to delete D:\wso2-workspace\TestFromGit\product-ei\integration\mediation-tests\tests-transport\target\jacoco\agent\jacocoagent.jar
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:251)
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:193)
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:160)
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:160)
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:160)
at org.apache.maven.plugin.clean.Cleaner.delete (Cleaner.java:118)
at org.apache.maven.plugin.clean.CleanMojo.execute (CleanMojo.java:181)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.wso2.carbon.ei.tests.transport
I also built the project with maven in Eclipse:
Eclipse IDE for Enterprise Java Developers.
Version: 2019-06 (4.12.0)
Build id: 20190614-1200
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 1.8.0_221
But I got the same problem. I already set Java_home (jdk1.8.0_221) and Maven_home. I do not know how to solve this issue, Please give me advice !

ModuleVersionNotFoundException: Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb

I have following gradle.build file. I would like to generate jar from wsdl:
group 'com.parma.rudenkov'
version '1.0-SNAPSHOT'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "no.nils:wsdl2java:0.10"
}
}
apply plugin: "no.nils.wsdl2java"
apply plugin: "java"
wsdl2java{
wsdlsToGenerate = [
['-p','com.acme.mypackage', '-autoNameResolution',"$projectDir/src/main/resources/myWsdlFiles/BuyerServiceBean.wsdl"]
]
generatedWsdlDir = file("$projectDir/generatedsources")
wsdlDir = file("$projectDir/src/main/resources/wsdl")
locale = Locale.FRANCE
}
When I run gradle wsdl2java --stacktrace I get following exception:
Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':wsdl2java'.
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:63)
at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDependencyResolver.java:115)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingArtifactDependencyResolver.java:191)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:674)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:284)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:163)
at org.gradle.api.internal.BeanDynamicObject.getProperty(BeanDynamicObject.java:106)
at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:81)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getProperty(Unknown Source)
at no.nils.wsdl2java.Wsdl2JavaTask.setupClassLoader(Wsdl2JavaTask.groovy:94)
at no.nils.wsdl2java.Wsdl2JavaTask.wsdl2java(Wsdl2JavaTask.groovy:64)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 58 more
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:+ because no repositories are defined.
Required by:
com.param.rudenkov:pan:1.0-SNAPSHOT
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.NoRepositoriesResolver.resolve(NoRepositoriesResolver.java:48)
at org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyResolver.resolve(ProjectDependencyResolver.java:58)
at org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionResolver.resolve(DependencySubstitutionResolver.java:50)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionSelectorResolveState.resolveModuleRevisionId(DependencyGraphBuilder.java:861)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.resolveModuleRevisionId(DependencyGraphBuilder.java:230)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:119)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolveDependencyGraph(DependencyGraphBuilder.java:94)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:84)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:142)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:96)
at org.gradle.internal.Transformers$4.transform(Transformers.java:137)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:96)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:42)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:41)
at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:56)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:46)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:45)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:363)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:338)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:331)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:672)
... 74 more
BUILD FAILED
You have to specify repository where from download jar libraries.
repositories{
mavenCentral()
}

'Could not find us.bpsm:edn-java:0.4.3' error with Gradle for Clojure (Clojuresque)

I'm trying to use Gradle for Clojure (Clojuresque), I have this build.gradle.
buildscript {
repositories { maven { url "http://clojars.org/repo" } }
dependencies { classpath "clojuresque:clojuresque:1.7.0" }
}
apply plugin: 'clojure'
repositories {
maven { url "http://clojars.org/repo" }
}
When I execute gradle tasks, I have errors. I checked that there is no http://clojars.org/repo/us/bpsm directory. What might be wrong?
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find us.bpsm:edn-java:0.4.3.
Searched in the following locations:
http://clojars.org/repo/us/bpsm/edn-java/0.4.3/edn-java-0.4.3.pom
http://clojars.org/repo/us/bpsm/edn-java/0.4.3/edn-java-0.4.3.jar
Required by:
:clojure:unspecified > clojuresque:clojuresque:1.7.0 > clojuresque:clojuresque-nrepl:1.1.0 > clojuresque:clojuresque-common:1.1.0
> Could not find org.codehaus.groovy:groovy:1.8.9.
Searched in the following locations:
http://clojars.org/repo/org/codehaus/groovy/groovy/1.8.9/groovy-1.8.9.pom
http://clojars.org/repo/org/codehaus/groovy/groovy/1.8.9/groovy-1.8.9.jar
Required by:
:clojure:unspecified > clojuresque:clojuresque:1.7.0 > clojuresque:clojuresque-nrepl:1.1.0 > de.kotka.gradle:gradle-utils:0.2.2 > de.kotka.groovy:zweig:0.4.0
The missing artifact is located in maven central repository. The following script works fine:
buildscript {
repositories {
maven { url "http://clojars.org/repo" }
mavenCentral()
}
dependencies { classpath "clojuresque:clojuresque:1.7.0" }
}
apply plugin: 'clojure'
repositories {
maven { url "http://clojars.org/repo" }
}

No unit test success reported to sonar

A gradle build is creating a jacoco report which is picked up by sonar runner. After the sonar results are pushed to the sonar server, unit test coverage is displayed but unit test success is 0 even though all tests are run successfully.
Looking at the sonar runner log I see the following items reporting the source and classes locations:
15:52:36.087 INFO - Source dirs: /poc-sonar/src/main/java
15:52:36.087 INFO - Test dirs: /poc-sonar/src/test/java, /Volumes/Disk/Development/poc-sonar/src/test/groovy
15:52:36.088 INFO - Binary dirs: /poc-sonar/build/classes/main
This is raising the first question: Does Sonar have to see the compiled test classes for analysis?
Further down the log:
15:52:37.435 INFO - Sensor JaCoCoSensor...
15:52:37.445 INFO - Analysing /poc-sonar/build/jacoco/test.exec
15:52:37.546 INFO - No information about coverage per test.
15:52:37.548 INFO - Sensor JaCoCoSensor done: 113 ms
15:52:38.105 INFO - Execute decorators...
15:52:38.580 INFO - Store results in database
Jacoco has picked up the test.exec file, but reporting "No information about coverage per test"
What does that log statement mean? The sonar server actually exposes correct coverage! Is it an indicator for the missing test success reported by Sonar? What is missing for getting the unit
Unit Tests Coverage
50,0%
50,0% line coverage
Unit test success
0 tests
The full gradle build.script:
ext {
spockVersion = '0.7-groovy-2.0'
groovyVersion = '2.2.1'
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'sonar-runner'
group = "poc"
version = "1.0.0-SNAPSHOT"
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
maven {
credentials {
username "${artifactoryUsername}"
password "${artifactoryPassword}"
}
url "${artifactoryContextUrl}"
}
}
dependencies {
testCompile "junit:junit-dep:4.11"
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
testCompile "org.spockframework:spock-core:$spockVersion"
}
tasks.withType(Test) { task ->
jacoco {
destinationFile = file("$buildDir/jacoco/${task.name}.exec")
}
}
sonarRunner {
sonarProperties {
property 'sonar.projectName', rootProject.name
property 'sonar.projectDescription', rootProject.name
// sonar server and database
property "sonar.host.url", sonarHostUrl
property "sonar.jdbc.url", sonarJdbcUrl
//property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", sonarJdbcUsername
property "sonar.jdbc.password", sonarJdbcPassword
property 'sonar.sourceEncoding', 'UTF-8'
}
}
tasks.sonarRunner.dependsOn = []
In recent Sonar versions, the Sonar property for test report location has been renamed from sonar.surefire.reportsPath to sonar.junit.reportsPath. Hence you may have to set the latter manually. For example:
apply plugin: "sonar"
subprojects {
apply plugin: "java"
sonarRunner {
sonarProperties {
property "sonar.junit.reportsPath", test.reports.junitXml.destination
}
}
}