Ant question: getting values from the command line
I'm not very well up on ant, trying to learn a few things about it this afternoon.
Is it possible to read in values from the command-line ant call? The scenario I have in mind is this: I want to make a generic build file that would have targets for the basics (init, compile, clean, make_jar). I'd like to be able to do something like:
ant jarfile "Hello.jar" "Hello"
and use "Hello.jar" as the name of the generated jar file and "Hello" as the name of the main class in the manifest.
I don't see any way to do this in the ant documentation - the <arg> tag doesn't seem like much help here - but maybe I'm missing something. I can see how I'd do it with a properties file, but not from the command like. Any ideas, or is this impossible in ant?
(obviously I could write a quick bit of perl to configure the generic build file for each project, but I want to see what I can do with ant itself)
2 Years Ago
Related Article:Taking command line arguments
is a solved Java discussion thread by naffan that has 3 replies, was last updated 1 year ago and has been tagged with the keywords: arguments, command, line, parse.