Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can't do it directly as far as I know, but it is pretty common practice to accept a delimited String and split that into an array yourself.</p> <p>For example the <a href="http://maven.apache.org/plugins/maven-site-plugin/" rel="nofollow noreferrer">maven-site-plugin</a> allows you to specify a comma-delimited String of locales, while the <a href="http://scala-tools.org/mvnsites/maven-scala-plugin/usage_run.html" rel="nofollow noreferrer">maven-scala-plugin</a> handles this by allowing you to define the arguments with a pipe separator. You can look at the relevant Mojos to see how the argument is processed.</p> <p>Some example usages below:</p> <p>site-plugin:</p> <pre><code>-Dlocales=enGB,frFR </code></pre> <p>scala-plugin:</p> <pre><code>-DaddArgs=arg1|arg2|arg3 </code></pre> <p>Update: if you want to handle this more elegantly, you could use maven-shared-io to allow definition of an external descriptor file, then pass the descriptor location as a property. This means a single command-line argument can reference a structure of configuration.</p> <p>If this sounds like it might work for you, have a look at this <a href="https://stackoverflow.com/questions/1231561/how-to-share-common-properties-among-several-maven-projects/1265428#1265428">answer</a> that describes how to use external descriptors in the properties plugin, or this <a href="https://stackoverflow.com/questions/495208/how-to-externalize-pieces-of-maven-build-file/1222536#1222536">answer</a> that does similar for the xml-maven-plugin. Or you can just look at the assembly-plugin for ideas.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload