• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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: 26020
186
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.
 
Message for you sir! I think it is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic