• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

passing a list of parameter from the command line

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?


 
Saloon Keeper
Posts: 28410
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaScript
 
Daniel Beck
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic