Use pure Ant to implement if else condition (check command line input)

前端 未结 2 959
梦如初夏
梦如初夏 2020-12-14 20:24

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

Th

2条回答
  •  误落风尘
    2020-12-14 21:17

    If any of you require a plain if/else condition (without elseif); then use the below:

    Here I am dependent on a env variable DMAPM_BUILD_VER, but it may happen that this variable is not set in the env. So I need to have mechanism to default to a local value.

        
        
        
            
        
    

提交回复
热议问题