ant filtering - fail if property not set

前端 未结 5 1732
后悔当初
后悔当初 2020-12-15 16:47

I\'ve got a ant build.xml that uses the task to copy a variety of xml files. It uses filtering to merge in properties from a bu

5条回答
  •  别那么骄傲
    2020-12-15 17:13

    I was going to suggest that you attempt to use to actually load the properties into Ant, and then fail if any of them are not set, but I think I was interpreting your problem wrong (that you wanted to fail if a specified property was not set in the properties file).

    I think your best bet might be to use to (depending on your dev platform) do a grep for the "@" character, and then set a property to the number of occurences found. Not sure of exact syntax but...

    
    
        
            
        
    
    
    

提交回复
热议问题