How to over-write the property in Ant?

后端 未结 8 1282
旧时难觅i
旧时难觅i 2020-12-05 13:21

Is there a way to re-assign the value for the Ant property task? Or is there another task available for that purpose?

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-05 14:13

    Properties are immutable in ant. But that's not as terrible a limitation as it may seem. There's a whole class of programming languages where (most) variables are constant and yet they get stuff done   this is called "functional programming."

    You can "change" values used by different tasks by deriving new, changed properties from old ones, or changing parameters when calling tasks with the subant or antcall tasks. If you're creative you can usually find a way to solve your problem.

提交回复
热议问题