Environment Varaibles in Ant doesn't work in Fish shell

Today i was trying to run a ant build job in Fish shell (Arch Linux), and was kind of perplexed for a while. Reason is that the environment variables i set are not picked up by ant, even though i can see them set in shell prompt when running "echo $MY_VARIABLE". 

$ : set MY_VARIABLE 100

I am trying to access the variable in ant throught the following syntax.

<property environment="env" />

<echo message="${env.MY_VARIABLE}" />

and the above didn't work.

After reading through the manual, i kind of figured out that the environment variable i set is not cascaded to child processes that ant invokes. And to set a variable that will be cascaded to child process in fish shell, you should use the syntax

set -x MY_VARIABLE 100

After this, everthing worked like charm. (Note : In Fish shell you have to use the set command to export environment variables)