you pass params to ant from the commanline like this: java -Dyour.param.name=YourParamValue org.apache.tools.ant.Main in your build.xml, you can reference this by simply doing ${your.param.name} This is what they do in Ant's own build.xml so I'm assuming it works =) good luck Rob dave young wrote: > hi, > > i would really like to be able to pass down command line arguments (that > have been specified to ant on the command line) to some of my tasks > (well, java classes in my tasks). i have scoured the on-line docs and > have not managed to uncover a means of accomplishing this. > > is this just a no-go area in ant, or does anybody know of a way of > uncovering the values of command line arguments specified to ant?? > > the reason for me wanting to do this is as follows; > i have a class, which given a class or resource, will output where > abouts that resource was loaded, this can really help out when > diagnosing java code. > i have a common classpath which i use throughout my project. > i would like to make a "find" task within my build.xml file which reads > a resource/class name from the command line (ie: the next argument after > the "find" task name) and submits that string to my finding class, using > the same classpath as my building and testing tasks. > > hope somebody can either let me know how to do this or point out why i > am going about this completely the wrong way. i've been using makefiles > quite happily for donkeys years and do want to give this ant thing a go. > > regards, > > dave young.