JMeter Maven mojo throws IllegalArgumentException with large JTL file
<p>When I run my JMeter test with a large loop count (100 iterations on 15 HTTP requests) on my thread group I get an enormous JTL file out of JMeter.</p>

<p>This is a problem for the jmeter-maven-plugin I'm using (<a href="https://github.com/jmeter-maven-plugin/jmeter-maven-plugin" rel="nofollow">https://github.com/jmeter-maven-plugin/jmeter-maven-plugin</a>) which uses a java.util.Scanner to scan the JTL file looking for "false" to see if the tests fail. Because the file is so big (1.8GB) I get the following failure.</p>

<pre><code>[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.1:jmeter (jmeter-tests) on project performance-tests: Execution jmeter-tests of goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.1:jmeter failed. IllegalArgumentException -&gt; [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.1:jmeter (jmeter-tests) on project performance-tests: Execution jmeter-tests of goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.1:jmeter failed.
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
       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:862)
       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
       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:497)
       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)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution jmeter-tests of goal com.lazerycode.jmeter:jmeter-maven-plugin:1.10.1:jmeter failed.
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
       ... 20 more
Caused by: java.lang.IllegalArgumentException
       at java.nio.CharBuffer.allocate(CharBuffer.java:334)
       at java.util.Scanner.makeSpace(Scanner.java:840)
       at java.util.Scanner.readInput(Scanner.java:795)
       at java.util.Scanner.findWithinHorizon(Scanner.java:1685)
       at com.lazerycode.jmeter.FailureScanner.hasTestFailed(FailureScanner.java:36)
       at com.lazerycode.jmeter.JMeterMojo.parseTestResults(JMeterMojo.java:70)
       at com.lazerycode.jmeter.JMeterMojo.execute(JMeterMojo.java:54)
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
       ... 21 more
</code></pre>

<p>I'm working around this using ignoreResultFailures = true as a parameter to the jmeter-maven-plugin which avoids it using the java.util.Scanner and failing. Ideally the jmeter-maven-plugin would handle the very large JTL file, but the size of the JTL file seems a bit extreme.</p>

<p>Are there any JMeter settings that can reduce the size of the JTL file?</p>