execute Ant task if TWO conditions are met

后端 未结 2 1381
栀梦
栀梦 2020-12-20 12:56

The above ant script implements if dir_is_empty then git-clone else git-fetch using Ant-1.7.1 core statements

2条回答
  •  情深已故
    2020-12-20 13:36

    Even when bound to Ant 1.7.1 you may combine your 3 chk targets into one, see the condition part in the snippet. Since Ant 1.9.1 (better use Ant 1.9.3 because of bugs in Ant 1.9.1 see this answer for details) it is possible to add if and unless attributes on all tasks and nested elements, so no extra target needed, f.e. :

    
    
      
        
          
          
            
          
        
      
    
      
        
        
        
      
    
      
        
      
    
    
    

提交回复
热议问题