dcsimg
why ${env.HOSTNAME} and not ${HOSTNAME} when getting the hostname?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gorem_Sideroff
Posted On:   Thursday, August 24, 2006 09:52 AM

When I write in a linux prompt

echo ${env.HOSTNAME} i get

bash: ${env.HOSTNAME}: bad substitution


there is no problem though with ${HOSTNAME}


When I run the jBoss testsuite I have problems starting a test server on ${env.HOSTNAME} and ${HOSTNAME} and not when starting it with the real hostname of the mashine even though ${HOSTNAME} is correctly set. So maybe this is something wrong in my setup and not an ant problem.

I want to mention that I don't understant anythingabout ant and maybe my question is stupid. Sorry :(

Re: why ${env.HOSTNAME} and not ${HOSTNAME} when getting the hostname?

Posted By:   Anonymous  
Posted On:   Thursday, August 24, 2006 10:46 AM

there is nothing wrong with you ant setup. If you have an environment variable HOSTNAME then accessing it through ant will be env.HOSTNAME



You can actually change this prefix if you want.





Why is this? Well ant properties are immutable so you don't want some random environment variable FOO keeping you from using the property FOO.



If you are having trouble with ${env.HOSTNAME} make sure

is in your ant script. And print it to STDOUT so you can make sure its the correct value.
About | Sitemap | Contact