Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-103

Gradle-Artifactory integration depends on httpclient 4.0.1 (but comes with 4.0)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.4
    • Component/s: Gradle
    • Labels:
      None
    • Environment:

      Debian GNU/Linux 5.0, SUN JDK 6.0_20

      Description

      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 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

        Attachments

          Activity

            People

            • Assignee:
              elig Eli Givoni
              Reporter:
              davide.cavestro Davide Cavestro
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: