I've been using the ant task to generate a schema.sql file for years.I recently upgraded from Hibernate 4 to 5 to find that now the task always appends to any existing file.I traced the behavior to the org.hibernate.tool.schema.internal.exec.ScriptTargetOutputToFile class: