Could not find or load main class io.gatling.mojo.MainWithArgsInFile when create new project with maven plugin.

Hi there!

Ubuntu setup for run gatling tests:

  • Itellij idea
  • maven archetype:
    groupId = io.gatling.highcharts
    artifactId = gatling-highcharts-maven-archetype
    version = 3.0.0
  • java version:

java version “1.8.0_191”
Java™ SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot™ 64-Bit Server VM (build 25.191-b12, mixed mode)

  • javac version
    javac 1.8.0_191

  • scala plugin for intellij

  • comannd for run gatling

  • gatling:test -e

  • maven plugin section in pom file

After run gatling-maven-plugin-demo from https://github.com/gatling/gatling-maven-plugin-demo or creation new project, i see stacktrace below.

How can i fix this?

[INFO] — gatling-maven-plugin:3.0.0:test (default-cli) @ ts-load —
Error: Could not find or load main class io.gatling.mojo.MainWithArgsInFile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.020 s
[INFO] Finished at: 2018-11-18T22:06:38+03:00
[INFO] Final Memory: 9M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.0.0:test (default-cli) on project ts-load: Gatling failed. Simulations compilation failed. Process exited with an error: 1 (Exit value: 1) → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.gatling:gatling-maven-plugin:3.0.0:test (default-cli) on project ts-load: Gatling failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Gatling failed.
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:227)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
… 21 more
Caused by: io.gatling.mojo.CompilationException: Simulations compilation failed.
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:274)
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:205)
… 23 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at io.gatling.mojo.Fork.run(Fork.java:136)
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:272)
… 24 more

Could be https://github.com/gatling/gatling/issues/3600

Thanks for share github link!
This section from workaround not compiled:

-Djdk.net.URLClassPath.disableClassPathURLCheck=true

Should i explicitly install zinc for avoid error?