Added the hibernate-maven-plugin to generate the schemata for all pu's
authorKai Moritz <kai@juplo.de>
Wed, 16 Aug 2017 09:56:39 +0000 (11:56 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 16 Aug 2017 11:37:39 +0000 (13:37 +0200)
pom.xml

diff --git a/pom.xml b/pom.xml
index 0b86e21..826fb20 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>de.juplo</groupId>
+        <artifactId>hibernate-maven-plugin</artifactId>
+        <version>2.1.0</version>
+        <configuration>
+          <execute>false</execute>
+          <show>true</show>
+          <format>true</format>
+        </configuration>
+        <executions>
+          <execution>
+            <id>Schema for Persistence-Unit annotated</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>create</goal>
+            </goals>
+            <configuration>
+              <persistenceUnit>annotated</persistenceUnit>
+              <outputFile>schema-annotated.sql</outputFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>Schema for Persistence-Unit xml</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>create</goal>
+            </goals>
+            <configuration>
+              <persistenceUnit>xml</persistenceUnit>
+              <outputFile>schema-xml.sql</outputFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>Schema for Persistence-Unit data-model</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>create</goal>
+            </goals>
+            <configuration>
+              <persistenceUnit>data-model</persistenceUnit>
+              <outputFile>schema-data-model.sql</outputFile>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>${h2.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>de.juplo.yourshouter.api</groupId>
+            <artifactId>data-model</artifactId>
+            <version>1.5.1</version>
+          </dependency>
+        </dependencies>
+      </plugin>
     </plugins>
   </build>