I am trying to set up ANT build. However when I invoke bu开发者_如何学运维ild command
helloworld_15/${NAME} does not exist.
BUILD FAILED (total time: 0 seconds)
Also the configure variables does not seems to be assigned.
However i have set them into /etc/envitonment
I tried echo $<varaiable_name>
and value get displayed.
Tried to google but not solutions seems am the first one having this issue.
PS: OS Ubuntu 10.10
The environment variables of the calling shell are not, by default, converted into Ant properties. If you want to access them, you need to 'import' them using something like:
<property environment="e_pref" />
in your buildfile. Once you've done that, you can access them by means of the prefix you just set:
<echo message="NAME=${e_pref.NAME}" />
You can set environment=""
- i.e. an empty prefix - but you would still need the dot to access:
<echo message="NAME=${.NAME}" />
Sorted out the issue. Somehow netbeans ant does not access environment variables when run in sudo mode. I didnt find out a solution for that but i settled down with non sudo UI fornetbeans.
Thanx for your valuable time and help.
精彩评论