my webapp has a hibernate config file that specifies db password as follows:
<property name="hibernate.connection.password">p1ssw2rd</property>
it also has an ant build file, is it possible to specify the db password at build time and then pass it to hibernate?
<target name="init-development">
<property name="databasePassword" value="xxxx"/>
</target>
You can create template hibernate config with password label like this:
and when ant starts a build, copy template config over real hibernate config, applying replacement password label with real db password specified in build.xml.
It is like that: