Is there a way to pass Maven list/array property (e.g. maven-exec-plugin arguments optional parameter) using system properties approach?
I know that the arguments optional parameter can be overridden by exec.args environment variable and commandlineArgs optional parameter can be overridden by exec.args system property. But what I would like to find out if there's a generic Maven command line way to override such list/array properties of plugin configurations using system properties when it comes to other plugins having such list/array configuration properties?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>execute somebinary</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>somebinary</executable>
<arguments>
<argument>arg1</argument>
<argument>arg2</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
I expect to do this by a command like:
mvn exec:exec -Dexec.arguments=arg1,arg2
But it doesn't work as I expect.
Just pul the list of parameters into the double quote "". Example: pom.mxl
main class
command line arguments