Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing a list of parameter from the command line

 
Daniel Beck
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have the following problem, and I don't know how to solve it elegantly in ant.

I need to pass to a JavaProgramm a list of strings, where each element of the lost has this form :
"grammar/xtdl/ne/${lang}/${lang}.spj" , where "lang" represents languages, and can have values like "de", "en" , "en_US", "it", and so on ...
Only the user knows how many elements to pass to that Java class.
And, I want the ant programm to be usuable. So the user of this ant programm should run ant like that:

ant install -Dlang=en:de:fr:cn
and I want the target to got call java de.util.SproutProjectToInstallPackage with argv="grammar/xtdl/en/en.spj grammar/xtdl/de/de.spj grammar/xtdl/fr/fr.spj grammar/xtdl/cn/cn.spj"
So my question:
How can I do that ?


 
Tim Holloway
Saloon Keeper
Pie
Posts: 17627
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript
 
Daniel Beck
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hugh ? JavaScript ?
I do it for now so, that I use an xslt script to create a new ant-file on the fly - thought I don't think that this is beautifull. I would have liked to do it in ant, but I thing, this is not feasable.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic