Using External JAR files with gradle 1.9- Gatling dependency not found

I am using gatling 2.0.0-SNAPSHOT for load testing in my java project.

There is no pom file, but we do have our project configured to use a company repository for getting many of our dependencies via entries in .m2/settings.xml

We are using the gradle wrapper to run commands. I’ve been alternating between using the command line and the gradle plugin for IntelliJ Community (v 13.1.4) .

When I try to run ./gradlew clean build, everything seems to be coming up except for the gatling dependency.

Is there a way to pull it in from its original location at sonatype.org, or would I need to have it added to my company’s repository?

I’ve included the layout of my build.gradle file and the error message.

Thanks in advance.

  • Nadine

build.gradle>

allprojects {
    apply plugin: 'application'
   //apply
plugins also referenced for
'eclipse', 'idea', 'java', 'maven', 'scala'
}
  repositories {
mavenLocal()
  maven {
    // credentials for company repo
   // url for company repo
 }
}
  dependencies {
// a whole list of *compile 'foo' statements, of which gatling is one
testCompile 'junit:junit:4.10'
    testCompile 'org.mockito:mockito-core:1.9.5'
  // my entries start here:
     testCompile 'org.sonatype.oss.io.gatling:gatling-charts-highcharts:2.0.0-SNAPSHOT'
    testCompile 'org.scala-lang:scala-library:2.11.1'
}

++++++ At the command line, I’m using > ./gradlew clean build

I’m using a Macbook Pro with osx 10.9.4, 64-bit system

+++++++

error msg> FAILURE: Build failed with an exception.

  • What went wrong:

Could not resolve all dependencies for configuration ‘:testCompile’.

Could not find org.sonatype.oss.io.gatling:gatling-charts-highcharts:2.0.0-SNAPSHOT.

Required by:

< our app>:1.1-SNAPSHOT

Hi, the issue is now resolved.

I asked the gatling developers about correct names to use, for Gradle and they told me to use Maven :wink:

No, seriously, I ran my references by them and they verified the repository url I needed to use. It came out to these changes in my build.gradle file >>

repositories {

maven {

url: ‘https://oss.sonatype.org/content/repositories/snapshots

} }

// in dependencies testCompile ‘org.sonatype.oss.io.gatling:gatling-charts-highcharts:2.0.0-SNAPSHOT’