I have thought about your comments. I see the need for more flexibiliy. But on the other hand, I would like to keep the complexity low.
I would suggest a template based mechanism, but I am afraid of the overhead (velocity libaries) we need. Are there any built in possibilities in ANT?
I used an ant-only solution which allows a jreleaseinfo ant target to have child "property" elements. Here "property" is used as a synonym for the existing "parameter" elements. It would have been better to just extend the existing "parameter" element but I couldn't see a way of getting this to work. A property element has the attributes name, value, type (i.e. the same as the parameter elements) but can also have additional attributes, such as boolean-valued "final" and "static" which specify the modifiers that the generated methods should have.
I'm not really happy with this solution, however, as it does seem to be a misuse of the "property" element, which has a fairly restricted use in ant as a way of specifying name-value pairs. Perhaps another name for the child elements could be chosen?