Maven download fails


(sabhinandan) #1

Hi,

I’m trying to execute a sample application having

repositories {

// mavenCentral()

} I’m getting following error, it is not able to download jars from below URL:

Could not HEAD ‘http://repo1.maven.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.pom’. Even I tried giving like this:

maven {

url “http://repo1.maven.org/maven2

} getting same issues

Then I went to above site, it redirected me to

http://search.maven.org/

I modified my repositories path to below repositories {

maven {

url “http://search.maven.org/remotecontent?filepath=” }

}

now getting following error: > Could not resolve group:commons-io, module:commons-io, version:1.4.

Required by:

:quickstart:unspecified

Could not HEAD ‘http://search.maven.org/remotecontent?filepath=/commons-io/commons-io/1.4/commons-io-1.4.pom’.

Please let me know, How can I configure mavenCentral() repository to download the jars.

Thanks, Abhinandan


(René Groeschke) #2

I just tried to reproduce your problem with the following script:

repositories{
 mavenCentral()
}
  configurations{
 cfg
}
  dependencies{
 blubb "commons-io:commons-io:1.4"
}
  task printCfg << {
 configurations.cfg.each{
  println it
 }
}

Are you maybe sitting behind a proxy?