Running gant script sets ant.home to null?

When I run a gant script on a module with the gant facet set, it seems to set ant.home to null by specifying -Dant.home= on the command.  So the command starts off like this:

"C:\Program Files\Java\jdk1.6.0_03\bin\java" -Dant.home= -Dgant.home=C:\Tools\gant-1.6.1

This is causing a problem when my gant scripts invokes some ant targets that exist in other build files.  It can't locate optional ant task classes.  If I override ant.home by passing in a vm argument in my run configuration it works just fine, but I really don't want to have to set up all run configs to work that way.  Two questions.  First, why is intellij setting ant.home to nothing in this case, and second, how do I change this behavior?

Thanks in advance.

4 comments
Comment actions Permalink

This property is set because otherwise Gant runner would fail, but with
empty property it works just fine with standalone scripts. Currently the
best way to override it is to set it once more in VM parameters, as you
already do. We could add a special setting for it to Gant run
configuration, or we could set any other reasonable default value ro
this property so that it would work for you. Do you know of such a magic
value?

0
Comment actions Permalink

8.1.3 will contain the ant.home setting in Gant script run
configuration. You may set it once in its template settings.

0
Comment actions Permalink

Couldn't you default ant.home to the value of the environment variable ANT_HOME if it has been defined and only set it to null if ANT_HOME doesn't exist?  That would better mirror what actually happens when you call "gant" from command line.  That's basically what I'm doing when I set ant.home as a vm argument.  It's just manual.

0
Comment actions Permalink

Sounds reasonable, thank you.

0

Please sign in to leave a comment.