forked from snyk-schmidtty/mega-monorepo-sakai
/
pom.xml
160 lines (152 loc) · 6.82 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- adjust these name,groupId,artifactId to match your project -->
<name>Sakai Hierarchy DB DDL generator</name>
<groupId>org.sakaiproject.hierarchy</groupId>
<artifactId>hierarchy-ddl-generator</artifactId>
<packaging>pom</packaging>
<!-- this should refer to your project base POM (remove if not needed) -->
<parent>
<artifactId>hierarchy</artifactId>
<groupId>org.sakaiproject</groupId>
<version>22-SNAPSHOT</version><!--hierarchy.version-->
</parent>
<properties>
<!-- change this to reflect the name to use for the ddl files -->
<project.ddl.name>hierarchy</project.ddl.name>
</properties>
<dependencies>
<!-- pull in your hibernate persistent objects -->
<dependency>
<groupId>org.sakaiproject.hierarchy</groupId>
<artifactId>hierarchy-api</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<!-- this should pull in your hibernate template (.hbm.xml) files -->
<directory>${basedir}/../java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<!-- hibernate ddl generation -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<outputDirectory>.</outputDirectory>
</component>
</components>
<componentProperties>
<configurationfile>hibernate.cfg.xml</configurationfile>
<propertyfile>hibernate-hsqldb.properties</propertyfile>
<outputfilename>hsqldb/${project.ddl.name}.sql</outputfilename>
<drop>false</drop>
<create>true</create>
<export>false</export>
<jdk5>true</jdk5>
<format>true</format>
</componentProperties>
</configuration>
<executions>
<execution>
<id>export-hsqldb</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
<execution>
<id>export-mysql</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-mysql.properties</propertyfile>
<outputfilename>mysql/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
<execution>
<id>export-oracle</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-oracle.properties</propertyfile>
<outputfilename>oracle/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
<execution>
<id>export-db2</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-db2.properties</propertyfile>
<outputfilename>db2/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
<execution>
<id>export-mssql</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-mssql.properties</propertyfile>
<outputfilename>mssql/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
<execution>
<id>export-derby</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-derby.properties</propertyfile>
<outputfilename>derby/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
<execution>
<id>export-postgres</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<propertyfile>hibernate-postgres.properties</propertyfile>
<outputfilename>postgres/${project.ddl.name}.sql</outputfilename>
</componentProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>