In my jpa app i want to switch ddl schema generation per profile. For schema generation enabled i need additional lines:
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
<property name="javax.persistence.schema-generation.scripts.create-target" value="sampleCreate.ddl"/>
<property name="javax.persistence.schema-generation.scripts.drop-target" value="sampleDrop.ddl"/>
if schema generation is disabled this lines should be not there or disabled. Adding ${some.prop}
into xml to filter it by maven raises errors in persistence.xml (ide). Since i want to switch all this lines at once it would be fine if there is onlz one property to be set.
So how to achieve this?
Per profile you should set property like this
Now you can build it like
mvn clean install -PenableSchemaGeneration
and it will changein persistence.xml on