Gatling 2.0.0-SNAPSHOT, Gradle 2.0, IntelliJ -- Has anyone gotten this to work ?

I am working at integrating my gatling code into a java project using IntelliJ Community 13.1.4 with gradle and scala plugins enabled.

There is no pom file in the project, but we do have our project set up to pull dependencies from our company repository via .m2/settings.xml

There are compilation errors when I try to to build the project, and I think it is because I have not referenced the sonatype repository correctly (this is where I understand SNAPSHOT now lives). If this is not the case, please advise.

I’m new to all these technologies and languages, so troubleshooting is bit daunting.

If anyone has a basic build.gradle file they have gotten to work with Gatling 2.0.0-SNAPSHOT, it would be most appreciated.

I’ve included the layout of my build.gradle file, my entries from the command line and the error message.

Thanks in advance

  • Nadine

We have more and more demand for Gradle so we’ll have an official support but that’s a matter of months.
Until then, you can only rely on your own skills and hope you’ll get some help from other community members.

You can find several Gatling Gradle support/plugins on the internet (check out Third Parties Gatling wiki page) so there’s definitively a way. I personally just can’t say what they’re worth.

Honestly, if you’re new with Gradle, I’d recommend you don’t go with it have stick to something that’s officially supported, probably maven.

@Stephane: Thanks for your response. I think official support would be very much welcomed, because gradle is an amazing tool and seems to generally play well with others.

In my situation, gradle is a project requirement, so I am obligated to find a way to make it work. Aside from actual gradle-specific things, does it look like I am referencing the correct parts of gatling?

This has been one situation where googling for things caused more confusion than help. I found some gradle examples online (for gatling 1.5.3), that used a single reference (highcharts) and some had two ( gatling-app and gatling-charts). What would I actually need to run gatling SNAPSHOT without rebuilding from source code?

I just realized something else about my setup. For our project, we are using the gradle wrapper, which downloads and installs version 1.9 of gradle and ignores any local installations. So, this gradle.build file is actually running with 1.9; not 2.0.

In my situation, gradle is a project requirement, so I am obligated to find a way to make it work. Aside from actual gradle-specific things, does it look like I am referencing the correct parts of gatling?

I’d say yes.
Are you sure you declared the Sonatype repository?

This has been one situation where googling for things caused more confusion than help. I found some gradle examples online (for gatling 1.5.3), that used a single reference (highcharts) and some had two ( gatling-app and gatling-charts). What would I actually need to run gatling SNAPSHOT without rebuilding from source code?

I don’t know much about those examples, sorry.

If you need official Gradle support ASAP, I see 2 solutions:

  • Hope that someone else from the community shows up and help you
  • Sponsorize the development of this feature to make it happen faster.

That is a good question.

I have been referencing sonatype whereever it seemed appropriate in gradle.build, but this dependency is different from the others since it is a jar file pulled in from the web instead of the company repository.

Perhaps there is another step needed to make that happen in gradle.

I have a question in progress at the gradle forum about this, and am hoping to hear something back. If I do, I will update this post so others can benefit.

Maybe I’m missing something obvious, but this seems weird:

repositories {
mavenLocal()

maven {
// credentials for company repo
// url for company repo
}
}

dependencies {

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’

}

  1. I think you’ve got the group wrong for the gatling artifact
  2. I don’t think you’ve referenced the correct repository

The following works for us:

repositories {
maven {
url ‘http://repository.excilys.com/content/groups/public
}
}

dependencies {
testCompile group:‘io.gatling.highcharts’, name:‘gatling-charts-highcharts’, version:gatlingVersion
}

Apologies - this should read:

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

Thank you. That corrected the SNAPSHOT dependency error I was getting!

I also found a tool that has helped me figure out how to translate maven dependencies into their gradle equivalencies.
In combination with your update, it is starting to make more sense for me. url >> http://mvn2gradle.codetutr.com/