I have a hibernate.cfg.xml with the JDBC Url configured thus:
<property name="hibernate.connection.url">jdbc:mysql://${server.hostname}:3306/dsm?zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=true&autoReconnect=true</property>
Those & are required (instead of just &) in order to avoid the exception: The reference to entity "jdbcCompliantTruncation" must end with the ';' delimiter.
In order to be able to select a different target databases via Maven, I would like to change this to:
<property name="hibernate.connection.url">${jdbc.url}</property>
in which ${jdbc.url} is a property defined in Maven. However the problem is that Maven seems to convert all the & to &, which then causes Hibernate to throw the above exception.
Anyone have a workaround for this?