Could not find group:org.codehaus.cargo in MavenCentral


(winkler1) #1

Hi-

I’m trying to use Gradle for the first time to deploy a WAR with the cargo plugin. It seems to be getting hung up pulling from MavenCentral. Is there a problem with this in M6, or am I doing something wrong? I’ve tried blowing away ~/.gradle/caches. Thanks.

ERROR: ---------- FAILURE: Build failed with an exception.

  • What went wrong: Could not find group:org.codehaus.cargo, module:cargo-ant, version:1.1.4. Required by:

:gradle:unspecified

SCRIPT ------ apply plugin: ‘cargo’ buildscript {

repositories {

mavenCentral()

add(new org.apache.ivy.plugins.resolver.URLResolver()) {

name = ‘GitHub’

addArtifactPattern ‘http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]’

}

}

dependencies {

classpath ‘bmuschko:gradle-cargo-plugin:0.5.2’

} }

dependencies {

cargo “org.codehaus.cargo:cargo-ant:1.1.4”,

“org.codehaus.cargo:cargo-core-uberjar:1.1.4” }

cargo {

containerId = ‘tomcat6x’ }


#2

You have added the mavenCentral() repository to your buildscript project, but don’t have any repositories declared for your main build.

I think you need to add this above your second dependencies section

repositories {
    mavenCentral()
}

and you can probably remove the mavenCentral() declaration from the repositories section inside buildscript {}.