Announcement Announcement Module
Collapse
No announcement yet.
Build failure: Could not GET ... docbook-xsl-saxon-1.0.0.jar ... Unauthorized Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Build failure: Could not GET ... docbook-xsl-saxon-1.0.0.jar ... Unauthorized

    Hi,

    I am trying to build spring-framework from source for tag v3.2.2.RELEASE. I get the following error when I try to build it using gradlew.

    Evaluating root project 'spring' using build file '/home/najmi/springsource/git/clone/spring-framework/build.gradle'.
    :: loading settings :: url = jar:file:/home/najmi/.gradle/wrapper/dists/gradle-1.3-bin/6duudkdtsf89ftu9dh8bpgenv0/gradle-1.3/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
    Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: http://repo.springsource.org/plugins...xon-1.0.0.jar]

    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not resolve all dependencies for configuration ':classpath'.
    > Could not download artifact 'net.sf.docbook:docbook-xsl-saxon:1.0.0@jar'
    > Could not download artifact 'net.sf.docbook:docbook-xsl-saxon:1.0.0@jar'
    > Could not GET 'http://repo.springsource.org/plugins-release/net/sf/docbook/docbook-xsl-saxon/1.0.0/docbook-xsl-saxon-1.0.0.jar'. Received status code 401 from server: Unauthorized

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

    BUILD FAILED
    Indeed the resource giving Unauthorized error seems to require authentication:

    http://repo.springsource.org/plugins...axon-1.0.0.jar

    I did not find anything in archives regarding this problem.
    Please note that I am new to gradle and apologize if this is something obvious. Thanks for your help.
    Last edited by farrukh_najmi; May 7th, 2013, 08:46 AM.

  • #2
    solution

    make sure you local maven repository have the docbook-xsl-saxon-1.0.0.jar file

    modify the build.gradle file ,it will check local first.
    repositories {
    mavenLocal()
    maven { url "http://repo.springsource.org/plugins-release" }
    }

    Comment


    • #3
      Thank you JoeSmart! That workaround got beyond that one dependency but then I got another and then then another.
      I am curious how come this is so for a highly used, top-notch OS project.

      The last one for some reason does not go away even when I try the workaround you suggest. Here is the stacktrace:

      :spring-core:asmRepackJar FAILED

      FAILURE: Build failed with an exception.

      * Where:
      Build file '/home/najmi/springsource/git/clone/spring-framework/build.gradle' line: 182

      * What went wrong:
      Execution failed for task ':spring-core:asmRepackJar'.
      > Could not resolve all dependencies for configuration ':spring-core:jarjar'.
      > Could not download artifact 'com.googlecode.jarjar:jarjar:1.3@jar'
      > Could not download artifact 'com.googlecode.jarjar:jarjar:1.3@jar'
      > Could not HEAD 'http://repo.springsource.org/libs-release/com/googlecode/jarjar/jarjar/1.3/jarjar-1.3.jar'. Received status code 401 from server: Unauthorized


      Originally posted by joesmart View Post
      solution

      make sure you local maven repository have the docbook-xsl-saxon-1.0.0.jar file

      modify the build.gradle file ,it will check local first.
      repositories {
      mavenLocal()
      maven { url "http://repo.springsource.org/plugins-release" }
      }

      Comment


      • #4
        I finaly got the build to work after adding both mavenLocal() and mavenCentral() to the repsoitories scripts. Here is the resulting diff:

        Code:
        diff --git a/build.gradle b/build.gradle
        index fac5af1..b285f58 100644
        --- a/build.gradle
        +++ b/build.gradle
        @@ -1,5 +1,7 @@
         buildscript {
                repositories {
        +                mavenLocal()
        +                mavenCentral()
                        maven { url "http://repo.springsource.org/plugins-release" }
                }
                dependencies {
        @@ -61,6 +63,8 @@ configure(allprojects) { project ->
                }
         
                repositories {
        +                mavenLocal()
        +                mavenCentral()
                        maven { url "http://repo.springsource.org/libs-release" }
                }
        I would be grateful if someone from teh dev team can comment on the build issue in this thread. Should it not be the case that the http://repo.springsource.org/libs-release and http://repo.springsource.org/plugins-release should not require authentication for build to succeed. Thanks.

        Comment

        Working...
        X