Use pure Ant to implement if else condition (check command line input)
问题 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: <target name="doIt"> //What to do here? </target> 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