In Ant is there any way to do something like this:
<arguments id='arg-list'> <arg value='arg1' /> <arg value='arg2' /> </arguments> <property name='prop1' refid='arg-list' />
I’m trying to write a macro for psexec and I’m looking for a nice way to pass in the argument list.
I know that you can do something similar with classpaths…
Thanks!
I don’t know of an answer to your specific question. The documentation is clear that refid ‘Only yields reasonable results for references to PATH like structures or properties.’
Without a bit more information on what you’re trying to do, it’s hard to comment. At the risk of changing your design, rather than answering your question, I suggest:
1) You can pass the argument list to exec as a line:
Which will run example.exe:
2) I pass in arguments to macros that call external apps like this:
This will run example.exe:
I hope I haven’t been teaching my grandmother to suck eggs here.