Hey!
Did you manage to solve your issue?
On my side, I manage to reproduce something like what you described:
$ git clone g...@github.com:gatling/gatling-maven-plugin-demo.git
$ cd gatling-maven-plugin-demo
$ docker run -it --rm -w "/maven-demo" -v "$(pwd)":"/maven-demo":ro maven mvn gatling:test -Dgatling.simulationClass=computerdatabase.BasicSimulation
[INFO] Scanning for projects...
[[...snip download lines..]]
[INFO]
[INFO] -------------< io.gatling.demo:gatling-maven-plugin-demo >--------------
[INFO] Building gatling-maven-plugin-demo 3.6.1
[INFO] --------------------------------[ jar ]---------------------------------
[[...snip download lines..]]
[INFO]
[INFO] --- gatling-maven-plugin:3.1.2:test (default-cli) @ gatling-maven-plugin-demo ---
[[...snip download lines..]]
19:03:50.347 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Engine$.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Engine$.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Engine.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Engine.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Engine$delayedInit$body.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Engine$delayedInit$body.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/IDEPathHelper$.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/IDEPathHelper$.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/IDEPathHelper.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/IDEPathHelper.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Recorder$.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Recorder$.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Recorder.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Recorder.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/Recorder$delayedInit$body.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/Recorder$delayedInit$body.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/computerdatabase/BasicOtherSimulation.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/computerdatabase/BasicOtherSimulation.class: Read-only file system
19:03:50.348 [ERROR] i.g.c.ZincCompiler$ - error writing /maven-demo/target/test-classes/computerdatabase/BasicSimulation.class: java.nio.file.FileSystemException /maven-demo/target/test-classes/computerdatabase/BasicSimulation.class: Read-only file system
19:03:50.353 [ERROR] i.g.c.ZincCompiler$ - 10 errors found
19:03:50.355 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed
sbt.internal.inc.CompileFailed: null
at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:335)
at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:420)
at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
at io.gatling.compiler.ZincCompiler$.doCompile(ZincCompiler.scala:257)
at io.gatling.compiler.ZincCompiler$.delayedEndpoint$io$gatling$compiler$ZincCompiler$1(ZincCompiler.scala:264)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:41)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1(App.scala:76)
at scala.App.$anonfun$main$1$adapted(App.scala:76)
at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:41)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:53)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:34)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.207 s
[INFO] Finished at: 2021-07-26T19:03:50Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.1.2:test (default-cli) on project gatling-maven-plugin-demo: Could not record simulation results.: /maven-demo/target/gatling/lastRun.txt: Read-only file system -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Maven needs a writing place to put the compiled classes, and gatling will need a place to write the reports.
We NEED a writable place somewhere.
You can either create a writable volume “target” in your project directory (maven should only write in this directory)
Eg:
$ docker run -it --rm -w "/maven-demo" -v "$(pwd)":"/maven-demo":ro -v /maven-demo/target maven mvn gatling:test -Dgatling.simulationClass=computerdatabase.BasicSimulation
Note the second -v argument.
Or configure a profile for maven to explain where to put this target directory (Manage directories and its maven best practice not to change this in the pom but in a profile only activated for your CI).
Hope that helps!
Cheers!
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/47ea18ec-bb16-470d-8a3a-2ab59722feb5n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/25ffa913-7030-4ad6-8a87-19f5fce067d3n%40googlegroups.com.