Following is my persistance.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="IntegratorMasterdataDS"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- <jta-data-source>java:/datasources/IDS1</jta-data-source> -->
<jta-data-source>java:/datasources/IDS</jta-data-source>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.generate_statistics" value="true"/>
</properties>
</persistence-unit>
</persistence>
When i need to build with production profile i need to comment and uncomment in above persistance.xml.
Is there any way in maven build to supply values during runtime in persistance.xml? (i remember in old projects i see {something.some} but not able to find how to use it in my use case?)