How do I pass command line arguments to ScalaTest using its maven plugin? I was looking for something like TestNG's delegateCommandSystemProperties
configuration, but the closest I could find in ScalaTest documentation were:
argLine
: Option to specify additional JVM options to pass to the forked processenvironmentVariables
: Additional environment variables to pass to the forked processsystemProperties
: Additional system properties to pass to the forked process
But isn't this redundant? For example if I want to pass environment=development
, I need to specify the following in pom.xml
:
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<argLine>-Denvironment=${env}</argLine>
</configuration>
</plugin>
and then run mvn test -Denv=development
. Is there a simpler way to pass command line arguments to ScalaTest directly?