Using Ant properties:

   ant -Dsome.prop=value

And in your build.xml, use ${some.prop} to get the value, for example:

<echo message="some.prop = ${some.prop}"/>