|
90 | 90 | </execution> |
91 | 91 | </executions> |
92 | 92 | </plugin> |
| 93 | + |
| 94 | + <!-- DatabaseCreator driver here --> |
93 | 95 | <plugin> |
94 | 96 | <groupId>org.codehaus.mojo</groupId> |
95 | 97 | <artifactId>exec-maven-plugin</artifactId> |
|
152 | 154 | </arguments> |
153 | 155 | </configuration> |
154 | 156 | </plugin> |
155 | | - <plugin> |
156 | | - <groupId>org.codehaus.mojo</groupId> |
157 | | - <artifactId>sql-maven-plugin</artifactId> |
158 | | - <version>1.5</version> |
159 | | - <dependencies> |
160 | | - <!-- specify the dependent jdbc driver here --> |
161 | | - <dependency> |
162 | | - <groupId>mysql</groupId> |
163 | | - <artifactId>mysql-connector-java</artifactId> |
164 | | - <version>${cs.mysql.version}</version> |
165 | | - </dependency> |
166 | | - </dependencies> |
167 | | - <configuration> |
168 | | - <driver>org.gjt.mm.mysql.Driver</driver> |
169 | | - <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url> |
170 | | - <username>${db.cloud.username}</username> |
171 | | - <password>${db.cloud.password}</password> |
172 | | - <!--all executions are ignored if -Dmaven.test.skip=true --> |
173 | | - <skip>${maven.test.skip}</skip> |
174 | | - <forceMojoExecution>true</forceMojoExecution> |
175 | | - </configuration> |
176 | | - <executions> |
177 | | - <execution> |
178 | | - <id>create-other-schema</id> |
179 | | - <phase>process-test-resources</phase> |
180 | | - <goals> |
181 | | - <goal>execute</goal> |
182 | | - </goals> |
183 | | - <configuration> |
184 | | - <srcFiles> |
185 | | - <srcFile>${basedir}/target/db/create-schema-view.sql</srcFile> |
186 | | - <srcFile>${basedir}/target/db/templates.sql</srcFile> |
187 | | - <srcFile>${basedir}/target/db/cloudbridge_schema.sql</srcFile> |
188 | | - <srcFile>${basedir}/target/db/cloudbridge_multipart.sql</srcFile> |
189 | | - <srcFile>${basedir}/target/db/cloudbridge_index.sql</srcFile> |
190 | | - <srcFile>${basedir}/target/db/cloudbridge_multipart_alter.sql</srcFile> |
191 | | - <srcFile>${basedir}/target/db/cloudbridge_bucketpolicy.sql</srcFile> |
192 | | - <srcFile>${basedir}/target/db/cloudbridge_policy_alter.sql</srcFile> |
193 | | - <srcFile>${basedir}/target/db/cloudbridge_offering.sql</srcFile> |
194 | | - <srcFile>${basedir}/target/db/cloudbridge_offering_alter.sql</srcFile> |
195 | | - </srcFiles> |
196 | | - </configuration> |
197 | | - </execution> |
198 | | - <execution> |
199 | | - <id>prefill-schema</id> |
200 | | - <phase>process-test-resources</phase> |
201 | | - <goals> |
202 | | - <goal>execute</goal> |
203 | | - </goals> |
204 | | - <configuration> |
205 | | - <sqlCommand>INSERT INTO `cloud`.`domain` (id, name, |
206 | | - parent, path, owner) VALUES (1, 'ROOT', NULL, '/', |
207 | | - 2)</sqlCommand> |
208 | | - </configuration> |
209 | | - </execution> |
210 | | - <execution> |
211 | | - <id>prefill-configuration</id> |
212 | | - <phase>process-test-resources</phase> |
213 | | - <goals> |
214 | | - <goal>execute</goal> |
215 | | - </goals> |
216 | | - <configuration> |
217 | | - <sqlCommand>INSERT INTO `cloud`.`configuration` |
218 | | - (category, instance, component, name, value) VALUES |
219 | | - ('Hidden', 'DEFAULT', 'management-server', 'init', |
220 | | - 'false')</sqlCommand> |
221 | | - </configuration> |
222 | | - </execution> |
223 | | - </executions> |
224 | | - </plugin> |
225 | | - </plugins> |
226 | | - </build> |
227 | | - </profile> |
228 | | - <profile> |
229 | | - <id>cleandb</id> |
230 | | - <activation> |
231 | | - <property> |
232 | | - <name>cleandb</name> |
233 | | - </property> |
234 | | - </activation> |
235 | | - <build> |
236 | | - <plugins> |
237 | | - <plugin> |
238 | | - <groupId>org.codehaus.mojo</groupId> |
239 | | - <artifactId>properties-maven-plugin</artifactId> |
240 | | - <version>1.0-alpha-2</version> |
241 | | - <executions> |
242 | | - <execution> |
243 | | - <phase>initialize</phase> |
244 | | - <goals> |
245 | | - <goal>read-project-properties</goal> |
246 | | - </goals> |
247 | | - <configuration> |
248 | | - <files> |
249 | | - <file>${project.parent.basedir}/utils/conf/db.properties</file> |
250 | | - <file>${project.parent.basedir}/utils/conf/db.properties.override</file> |
251 | | - </files> |
252 | | - <quiet>true</quiet> |
253 | | - </configuration> |
254 | | - </execution> |
255 | | - </executions> |
256 | | - </plugin> |
257 | | - <plugin> |
258 | | - <artifactId>maven-antrun-plugin</artifactId> |
259 | | - <version>1.7</version> |
260 | | - <executions> |
261 | | - <execution> |
262 | | - <phase>generate-resources</phase> |
263 | | - <goals> |
264 | | - <goal>run</goal> |
265 | | - </goals> |
266 | | - <configuration> |
267 | | - <target> |
268 | | - <filter token="VERSION" value="${project.version}" /> |
269 | | - <copy todir="${basedir}/target/db" filtering="true"> |
270 | | - <fileset dir="${project.basedir}/../setup/db/" /> |
271 | 157 |
|
272 | | - </copy> |
273 | | - <copy todir="${basedir}/target/db" filtering="true"> |
274 | | - <fileset |
275 | | - dir="${project.basedir}/../awsapi-setup/db/mysql/"> |
276 | | - <include name="**/*.sql" /> |
277 | | - </fileset> |
278 | | - </copy> |
279 | | - </target> |
280 | | - </configuration> |
281 | | - </execution> |
282 | | - </executions> |
283 | | - </plugin> |
| 158 | + <!-- Database schema deployer and db prefill seeder --> |
284 | 159 | <plugin> |
285 | 160 | <groupId>org.codehaus.mojo</groupId> |
286 | 161 | <artifactId>sql-maven-plugin</artifactId> |
|
294 | 169 | </dependency> |
295 | 170 | </dependencies> |
296 | 171 | <configuration> |
297 | | - |
298 | 172 | <driver>org.gjt.mm.mysql.Driver</driver> |
299 | 173 | <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url> |
300 | 174 | <username>${db.cloud.username}</username> |
|
0 commit comments