How to Pass parameters for a Ant script , which is invoked via shell script?

后端 未结 1 1214
予麋鹿
予麋鹿 2020-12-23 15:55

I need to invoke a ant script via shell script. Let us consider the parameters for ant script are a,b,c. how can i pass the parameter for those variables? I must provide the

1条回答
  •  半阙折子戏
    2020-12-23 16:57

    Do you mean assigning value to a property from command line? If so, try

    -DpropertyName=itsValue
    

    For example,

    
        
            
            
        
    
    

    and then

    ant -Dperson="MerryPrankster" hi
    

    yields

     [echo] Hello MerryPrankster
    

    0 讨论(0)
提交回复
热议问题