org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37

JFrog JIRA | Davide Cavestro | 6 years ago
  1. 0

    I am using the artifactory plugin in a free-style project that uses a gradle script (for a grails project). I previously had some problems I depicted in a [comment|http://wiki.hudson-ci.org/display/HUDSON/Artifactory+Plugin?focusedCommentId=46336813#comment-46336813] at hudson artifactory plugin home. Now, after updating artifactory to 2.3.0 and the Hudson Artifactory Plugin to 1.3.3 the problem symptom changed a bit: as soon as I enable the Gradle-Artifactory Integration and launch a build it fails complaining "module not found: org.apache.httpcomponents#httpclient;4.0.1" and similar things. Now I'm using: Hudson Artifactory Plugin 1.3.3 Hudson ver. 1.381 Artifactory 2.3.0 (rev. 12451) I noticed that the "remote-repos" virtual repository I configured as Resolution repository contains httpclient 4.0 (it is actually in the repo1 remote repository cache from http://repo1.maven.org/maven2)... it seems like artifactory is never contacted by hudson. What's wrong? I noticed if I put a httpclient-4.0.1.jar in the relevant folder everything WORKS FINE ... More specifically I get the following error: ... 11:08:37 :: problems summary :: 11:08:37 :::: WARNINGS 11:08:37 module not found: org.apache.httpcomponents#httpclient;4.0.1 11:08:37 11:08:37 ==== clientModule: tried 11:08:37 11:08:37 ==== da8075fa3c454f7d75c49fa4d734884c: tried 11:08:37 11:08:37 -- artifact org.apache.httpcomponents#httpclient;4.0.1!httpclient.jar: 11:08:37 11:08:37 /mnt/workspace/plugins/artifactory/WEB-INF/lib/httpclient-4.0.1.jar 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 :: UNRESOLVED DEPENDENCIES :: 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 :: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 11:08:37 11:08:37 FAILURE: Build failed with an exception. 11:08:37 11:08:37 * What went wrong: 11:08:37 Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 * Try: 11:08:37 Run with -S option to get the full (very verbose) stacktrace. 11:08:37 11:08:37 * Exception is: 11:08:37 org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure(DefaultIvyDependencyResolver.java:101) 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:74) 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingIvyService.java:82) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:495) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:169) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source) 11:08:37 at org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:36) 11:08:37 at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:118) 11:08:37 at org.gradle.configuration.DefaultInitScriptProcessor.process(DefaultInitScriptProcessor.java:37) 11:08:37 at org.gradle.initialization.InitScriptHandler.executeScripts(InitScriptHandler.java:40) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:125) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75) 11:08:37 at org.gradle.launcher.Main.execute(Main.java:93) 11:08:37 at org.gradle.launcher.Main.main(Main.java:42) 11:08:37 at org.gradle.launcher.GradleMain.main(GradleMain.java:49) 11:08:37 11:08:37 BUILD FAILED My gradle script follows (here I replaced curly braces with angular ones cause I don't know this wiki syntax): buildscript < // apply < // apply from: 'http://myartifactoryserver:8081/artifactory/repo/org/jfrog/buildinfo/build-info-extractor-gradle/1.0.1/artifactoryplugin-1.0.1.gradle' // > repositories < mavenCentral() mavenRepo urls: 'http://snapshots.repository.codehaus.org' mavenRepo urls: "http://repository.jboss.org/maven2/" > dependencies < classpath "org.grails:grails-gradle-plugin:1.0", "org.grails:grails-bootstrap:1.3.4" > > apply plugin: "grails" repositories < // mavenRepo urls: "http://myartifactoryserver:8081/repo" mavenCentral() mavenRepo urls: ["http://repository.jboss.org/maven2/"] > dependencies < compile "org.grails:grails-crud:1.3.4", "org.grails:grails-gorm:1.3.4", "org.springframework.security:spring-security-web:3.0.3.RELEASE", "org.hibernate:hibernate-tools:3.2.4.GA" runtime "org.slf4j:slf4j-log4j12:1.5.8" > Kind regards Davide

    JFrog JIRA | 6 years ago | Davide Cavestro
    org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37
  2. 0

    Artifactory Plugin - hudson - Hudson Wiki

    hudson-ci.org | 4 months ago
    org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': - unresolved dependency: #build-info-extractor-gradle;1.0-SNAPSHOT: not found - unresolved dependency: commons-logging#commons-logging;1.1.1: not found - unresolved dependency: com.google.code.findbugs#jsr305;1.3.9: not found - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found
  3. 0

    I am using the artifactory plugin in a free-style project that uses a gradle script (for a grails project). I previously had some problems I depicted in a [comment|http://wiki.hudson-ci.org/display/HUDSON/Artifactory+Plugin?focusedCommentId=46336813#comment-46336813] at hudson artifactory plugin home. Now, after updating artifactory to 2.3.0 and the Hudson Artifactory Plugin to 1.3.3 the problem symptom changed a bit: as soon as I enable the Gradle-Artifactory Integration and launch a build it fails complaining "module not found: org.apache.httpcomponents#httpclient;4.0.1" and similar things. Now I'm using: Hudson Artifactory Plugin 1.3.3 Hudson ver. 1.381 Artifactory 2.3.0 (rev. 12451) I noticed that the "remote-repos" virtual repository I configured as Resolution repository contains httpclient 4.0 (it is actually in the repo1 remote repository cache from http://repo1.maven.org/maven2)... it seems like artifactory is never contacted by hudson. What's wrong? I noticed if I put a httpclient-4.0.1.jar in the relevant folder everything WORKS FINE ... More specifically I get the following error: ... 11:08:37 :: problems summary :: 11:08:37 :::: WARNINGS 11:08:37 module not found: org.apache.httpcomponents#httpclient;4.0.1 11:08:37 11:08:37 ==== clientModule: tried 11:08:37 11:08:37 ==== da8075fa3c454f7d75c49fa4d734884c: tried 11:08:37 11:08:37 -- artifact org.apache.httpcomponents#httpclient;4.0.1!httpclient.jar: 11:08:37 11:08:37 /mnt/workspace/plugins/artifactory/WEB-INF/lib/httpclient-4.0.1.jar 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 :: UNRESOLVED DEPENDENCIES :: 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 :: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 :::::::::::::::::::::::::::::::::::::::::::::: 11:08:37 11:08:37 11:08:37 11:08:37 FAILURE: Build failed with an exception. 11:08:37 11:08:37 * What went wrong: 11:08:37 Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 * Try: 11:08:37 Run with -S option to get the full (very verbose) stacktrace. 11:08:37 11:08:37 * Exception is: 11:08:37 org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure(DefaultIvyDependencyResolver.java:101) 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:74) 11:08:37 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingIvyService.java:82) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:495) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:169) 11:08:37 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source) 11:08:37 at org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:36) 11:08:37 at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:118) 11:08:37 at org.gradle.configuration.DefaultInitScriptProcessor.process(DefaultInitScriptProcessor.java:37) 11:08:37 at org.gradle.initialization.InitScriptHandler.executeScripts(InitScriptHandler.java:40) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:125) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107) 11:08:37 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75) 11:08:37 at org.gradle.launcher.Main.execute(Main.java:93) 11:08:37 at org.gradle.launcher.Main.main(Main.java:42) 11:08:37 at org.gradle.launcher.GradleMain.main(GradleMain.java:49) 11:08:37 11:08:37 BUILD FAILED My gradle script follows (here I replaced curly braces with angular ones cause I don't know this wiki syntax): buildscript < // apply < // apply from: 'http://myartifactoryserver:8081/artifactory/repo/org/jfrog/buildinfo/build-info-extractor-gradle/1.0.1/artifactoryplugin-1.0.1.gradle' // > repositories < mavenCentral() mavenRepo urls: 'http://snapshots.repository.codehaus.org' mavenRepo urls: "http://repository.jboss.org/maven2/" > dependencies < classpath "org.grails:grails-gradle-plugin:1.0", "org.grails:grails-bootstrap:1.3.4" > > apply plugin: "grails" repositories < // mavenRepo urls: "http://myartifactoryserver:8081/repo" mavenCentral() mavenRepo urls: ["http://repository.jboss.org/maven2/"] > dependencies < compile "org.grails:grails-crud:1.3.4", "org.grails:grails-gorm:1.3.4", "org.springframework.security:spring-security-web:3.0.3.RELEASE", "org.hibernate:hibernate-tools:3.2.4.GA" runtime "org.slf4j:slf4j-log4j12:1.5.8" > Kind regards Davide

    JFrog JIRA | 6 years ago | Davide Cavestro
    org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Artifactory Plugin - Jenkins - Jenkins Wiki

    jenkins-ci.org | 2 months ago
    org.gradle.api.artifacts.LocationAwareResolveException: Could not resolve all dependencies for configuration 'classpath': 18:26:56 - unresolved dependency: #build-info-extractor-gradle;1.0-SNAPSHOT: not found 18:26:56 - unresolved dependency: commons-logging#commons-logging;1.1.1: not found 18:26:56 - unresolved dependency: com.google.code.findbugs#jsr305;1.3.9: not found 18:26:56 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 18:26:56

    Root Cause Analysis

    1. org.gradle.api.artifacts.LocationAwareResolveException

      Could not resolve all dependencies for configuration 'classpath': 11:08:37 - unresolved dependency: org.apache.httpcomponents#httpclient;4.0.1: not found 11:08:37

      at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure()
    2. org.gradle.api
      ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.rethrowFailure
      1. org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure(DefaultIvyDependencyResolver.java:101)
      2. org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:74)
      3. org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingIvyService.java:82)
      3 frames
    3. Gradle Core
      DefaultGradleLauncher.run
      1. org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:495)
      2. org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:169)
      3. org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
      4. org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:36)
      5. org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:118)
      6. org.gradle.configuration.DefaultInitScriptProcessor.process(DefaultInitScriptProcessor.java:37)
      7. org.gradle.initialization.InitScriptHandler.executeScripts(InitScriptHandler.java:40)
      8. org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:125)
      9. org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107)
      10. org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75)
      10 frames
    4. Gradle Launcher
      GradleMain.main
      1. org.gradle.launcher.Main.execute(Main.java:93)
      2. org.gradle.launcher.Main.main(Main.java:42)
      3. org.gradle.launcher.GradleMain.main(GradleMain.java:49)
      3 frames