I need to be able to store database config properties in src|main|java|dbConnection.properties
and include it to hibernate.cfg.xml
in form of
Following this, this and this I came up with the following Maven configuration that replaces/filters placeholders from your hibernate.cfg.xml file with properties from a properties file:
org.apache.maven.plugins
maven-resources-plugin
2.6
copy-resources
validate
copy-resources
${basedir}/target/extra-resources
src/main/resources
true
src/main/resources/dbConnection.properties
src/main/resources
true
*
hibernate.cfg.xml
With this configuration, you can run the validate Maven goal to generate the filtered files and see if they are relpaced correctly
This is of course useful if you are using Maven.