Build JAR file using alphagov/gradle-gatling-plugin - Exception in thread "main" java.nio.file.NoSuchFileException: target/test-classes

Hi, all!

I tried to deal with the Gradle plugin from third parties extensions list specified on the official Gatling site: http://gatling.io/docs/2.1.5/extensions/index.html#third-parties and realized that the mentioned plugin has not been updated for a long time (the latest commit was on Feb 16, 2015)

It is necessary to make at least two changes in this plugin:

Number 1.

final String GATLING_VERSION = ‘2.1.3’ should be replaced by final String GATLING_VERSION = ‘2.2.0-SNAPSHOT’

Number 2.

Need to add the line “mavenCentral()” to the list of repositories here:

project.repositories {

mavenCentral()

maven {

url ‘http://repository.excilys.com/content/groups/public

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

}

}

After that I run ./gradlew from gradle-gatling-plugin directory once again (this by default places an artifact in mavenLocal)
Using the command “gradle gatlingTest” I finally managed to build .JAR file

But too early to celebrate, because gatling scenarios execution failed:

[ant:scalac] Element ‘/home/user/TEMP/scala/build/classes/main’ does not exist.

[ant:scalac] Element ‘/home/user/TEMP/scala/build/resources/main’ does not exist.

Executing gatling scenarios: [UserPermissionScenario]

Exception in thread “main” java.nio.file.NoSuchFileException: target/test-classes

Could you help solve this issue?

Have you contacted the plugin developers? I think they might be in a better position to help you.

Thanks for the answer. IMHO, it appears that the problem is not only in the plugin. Gatling framework features are also important.
I mean ways to build (and run) a standalone JAR file with tests.

Sure, I opened new issue on github (where this plugin is placed):
https://github.com/alphagov/gradle-gatling-plugin/issues/15

But so far no response.