You can set variables as additional command line parameters. Here is a screenshot.
And then my conclusion:
echoproperties #Ant properties #Sun Mar 04 04:48:30 EST 2012 \==-buildfile ant.core.lib=E\:\\IntelliJ IDEA 114.145\\lib\\ant\\lib\\ant.jar ant.file=E\:\\IdeaProjects\\psiviewer\\build.xml ant.file.psiviewer=E\:\\IdeaProjects\\psiviewer\\build.xml ant.file.type=file ant.file.type.psiviewer=file ant.home=E\:\\IntelliJ IDEA 114.145\\lib\\ant ant.java.version=1.6 ant.library.dir=E\:\\IntelliJ IDEA 114.145\\lib\\ant\\lib ant.project.default-target=all ant.project.name=psiviewer ant.version=Apache Ant(TM) version 1.8.2 compiled on December 20 2010 awt.toolkit=sun.awt.windows.WToolkit basedir=E\:\\IdeaProjects\\psiviewer dir.idea=e\:/idea11 file.encoding=windows-1252 file.encoding.pkg=sun.io
You see that dir.idea
set to what we passed to ant.
source share