I am a newbie in Ant. My ant script receives a user input variable named "env" from command line:
e.g. ant doIt -Denv=test
The user input value could be "test","dev" or "prod".
I also have the "doIt
" target:
//What to do here?
In my target, I would like to create the following if else condition for my ant script:
if(env == "test") echo "test" else if(env == "prod") echo "prod" else if(env == "dev") echo "dev" else echo "You have to input env"
That's to check which value user has inputted from command line, then, print a message accordingly.
I know with ant-Contrib, I can write ant script with
. But for my project, I would like to use pure Ant to implement if else condition. Probably, I should use
?? But I am not sure how to use
for my logic. Could some one help me please?