generate-sources

How to generate enum from properties file in Maven?

The original title was "How to generate enum from properties file using ant?" I want to iterate over all properties and generate enum class that have every property. Im thinking about writing custom task, but I think i would need to put it in extra jar :| im using maven and i want to do it in generate-sources phase. ...