mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 31 forks source link

Increased resolution time when using wagon-git #40

Closed nobre84 closed 7 years ago

nobre84 commented 8 years ago

Hi! Thanks for the awesome tool! We just set up a private bitbucket repo using wagon-git, and on this project we both publish an android aar and consume another private dependency from our private repo. We found it resolves dependencies unusually slow, sometimes timing out still. Probably its our own fault, but if you could shed some light if it may have something to do with the plugin, please let me know! Our repositories look like this:

allprojects {
    repositories {
        jcenter()
        maven {
            credentials {
                username USERNAME
                password PASSWORD
            }
            url "https://api.bitbucket.org/1.0/repositories/my-team/private-repo/raw/releases"
        }
        maven {
            url "https://raw.githubusercontent.com/synergian/wagon-git/releases"
        }
    }
}

When executing gradle with --info flag we can spot a lot of stuff like this:

Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/nostra13/universalimageloader/universal-image-loader/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/nostra13/universalimageloader/universal-image-loader/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/google/code/gson/gson/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/google/code/gson/gson/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/octo/android/robospice/robospice-spring-android/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/octo/android/robospice/robospice-spring-android/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/org/codehaus/jackson/jackson-mapper-asl/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/org/codehaus/jackson/jackson-mapper-asl/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/aurelhubert/ahbottomnavigation/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/aurelhubert/ahbottomnavigation/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/io/socket/socket.io-client/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/io/socket/socket.io-client/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/facebook/android/facebook-android-sdk/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/facebook/android/facebook-android-sdk/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/android/support/support-v4/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/android/support/support-v4/]

Many dependencies are searching the wagon-git releases, which of course makes no sense. I tried in another working project, which already consumes third party repos, such as this:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.fabric.io/public' }
        maven { url "https://raw.githubusercontent.com/synergian/wagon-git/releases" }
    }
}

And the same behavior can be found when print --info output, many dependencies search wagon-git, fail, then properly resolve on the other repos.

Best regards, Rafael

mschonaker commented 7 years ago

Hi, Rafael.

The thing is that wagon-git is only part of the deployment process (i.e. upload). Once online, dependencies are resolved and downloaded with standard Maven (Gradle) components.

You should look for a solution to the slow download from GitHub with Gradle problem in general, disregard of wagon-git.