How can I allow an Ant property file to override the value set in another?

后端 未结 3 1745
不思量自难忘°
不思量自难忘° 2021-01-30 10:56

I have an ant file that does the following:




        
3条回答
  •  天涯浪人
    2021-01-30 11:34

    The initial problem with your set up is that you've got build.properties and build-defaults.properties reversed.

    Ant Properties are set once and then can never be overridden. That's why setting any property on the command line via a -Dproperty=value will always override anything you've set in the file; the property is set and then nothing can override it.

    So the way you want this set up is:

    
    
    
    

    This way:

    1. Anything set at the command line takes precedence over build.properties
    2. Anything set in build.properties overrides other values
    3. etc. on down the line.

提交回复
热议问题