[GRADLE-2641] Cannot resolve parent POM with SNAPSHOT version Created: 19/Jan/13  Updated: 24/Jan/13  Resolved: 20/Jan/13

Status: Resolved
Project: Gradle
Affects Version/s: 1.4-rc-1
Fix Version/s: 1.4-rc-2

Type: Bug
Reporter: Daz DeBoer Assignee: Unassigned
Resolution: Fixed Votes: 0

Attachments: Text File parent_snapshot_bug.log    
Known Issue Of:

 Description   

If a POM file contains a <parent> element that references another module with a SNAPSHOT version, Gradle enters an infinite loop attempting to resolve the parent module.



 Comments   
Comment by Marcel Overdijk [ 22/Jan/13 ]

I'm seeing similar behavior with a dependency to http://repo1.maven.org/maven2/com/google/android/android/4.1.1.4/android-4.1.1.4.pom.
It's endlessly downloaded also with 1.4-rc-2.

See also discussion: http://forums.gradle.org/gradle/topics/_1_4_rc_1_gradle_dependencies_results_in_endless_loop_stating_authentication_error

Comment by Adam Murdoch [ 22/Jan/13 ]

@Marcel, could you give us a few more details about your build, such as the repository definitions that you're using, and what the dependency declaration on android:4.1.1.4 looks like? Do you have a stack trace, or the output of running gradle with -i or -d?

Comment by Marcel Overdijk [ 22/Jan/13 ]

@Adam This is producible with a simple build.gradle like:

apply plugin: "java"

dependencies {
    compile "com.google.android:android:4.1.+"
}

repositories {
    mavenCentral()
}

I've also a gradle.properties file containing my proxy settings.

I don't get a stacktrace, it keeps endlessly looping over downloading:

09:17:04.432 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Attempt 272 to execute request
09:17:04.432 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: GET http://repo1.maven.org/maven2/com/google/android/android/maven-metadata.xml HTTP/1.1
09:17:04.432 [DEBUG] [org.apache.http.headers] >> GET http://repo1.maven.org/maven2/com/google/android/android/maven-metadata.xml HTTP/1.1

If you want the complete debug output I need to go over the file to remove some details I cannot post to the public. Let me know if you need more info. I would also prefer sending it by email.

^M

Comment by Daz DeBoer [ 22/Jan/13 ]

Hi Marcel.
Unfortunately, it looks like you are hitting a different problem to the one that we fixed here. I can successfully resolve 'android:4.1.+' with both 1.4-rc-1 and 1.4-rc-2.

We're definitely going to need to see your debug log files to work out what's going on. You can email them to me (darrell.deboer@gradleware.com). The output of the following commands would be useful:

  • gradle-1.3 --debug --refresh-dependencies list
  • gradle-1.4-rc-2 --debug --refresh-dependencies list
configurations {
    deps    
}
repositories {
    mavenCentral()
}
dependencies {
    deps "com.google.android:android:4.1+"
}
task list << {
    println configurations.deps.files
}
Comment by Marcel Overdijk [ 22/Jan/13 ]

I can confirm at home (without proxy) 1.4-rc-2 works as expected.
I will try it tomorrow at work again and mail you the output as you mentioned.

Comment by Marcel Overdijk [ 23/Jan/13 ]

@Daz The results should be in your mailbox. Thanks for helping out!

Comment by Marcel Overdijk [ 24/Jan/13 ]

For reference I'm adding the discussion link about my "looping" problem which was indeed a different problem: http://forums.gradle.org/gradle/topics/_1_4_rc_1_gradle_dependencies_results_in_endless_loop_stating_authentication_error

Generated at Wed Jun 30 12:27:27 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.