From e70143c1dcac2eabfdce2ea068bd02a3d4f09bd7 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 18 Jan 2013 18:11:42 -0800 Subject: [PATCH] maven: Fix developer/pom.xml to use DatabaseCreator Signed-off-by: Rohit Yadav --- developer/pom.xml | 324 ++++++++-------------------------------------- 1 file changed, 57 insertions(+), 267 deletions(-) diff --git a/developer/pom.xml b/developer/pom.xml index 95dfb9febdc..27849ea2825 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -90,200 +90,6 @@ - - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - - mysql - mysql-connector-java - ${cs.mysql.version} - - - - org.gjt.mm.mysql.Driver - jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud - ${db.cloud.username} - ${db.cloud.password} - - ${maven.test.skip} - true - - - - drop-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloud` - - - - create-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloud` - - - - grant-user-cloud - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloud-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - drop-database-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloud_usage` - - - - create-database-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloud_usage` - - - - grant-user-cloud-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud_usage.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloud-usage-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud_usage.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - drop-database-cloudbridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloudbridge` - - - - create-database-cloudbridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloudbridge` - - - - grant-user-cloudbridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloudbridge.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloudbridge-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloudbridge.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - - org.codehaus.mojo @@ -365,6 +171,11 @@ ${basedir}/developer-prefill.sql com.cloud.upgrade.DatabaseUpgradeChecker + --database=cloud,usage,awsapi + --rootpassword=${db.root.password} + + + @@ -402,96 +213,75 @@ + org.codehaus.mojo - sql-maven-plugin - 1.5 + exec-maven-plugin + 1.2.1 + mysql mysql-connector-java ${cs.mysql.version} + + commons-dbcp + commons-dbcp + ${cs.dbcp.version} + + + commons-pool + commons-pool + ${cs.pool.version} + + + org.jasypt + jasypt + ${cs.jasypt.version} + + + org.apache.cloudstack + cloud-utils + ${project.version} + + + org.apache.cloudstack + cloud-server + ${project.version} + - - org.gjt.mm.mysql.Driver - jdbc:mysql://${db.simulator.host}:3306/simulator - ${db.simulator.username} - ${db.simulator.password} - ${maven.test.skip} - true - - drop-database process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - drop database if exists `simulator` - - - - create-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - create database `simulator` - - - - grant-user-cloud - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - GRANT ALL ON simulator.* to - ${db.simulator.username}@`localhost` identified by - '${db.simulator.password}'; - - - - grant-user-cloud-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - GRANT ALL ON simulator.* to - ${db.simulator.username}@`%` identified by - '${db.simulator.password}'; - - - create-schema - process-test-resources - execute + java - - - ${basedir}/target/db/create-schema-simulator.sql - ${basedir}/target/db/templates.simulator.sql - - + + false + true + + org.apache.cloudstack + cloud-server + + com.cloud.upgrade.DatabaseCreator + + + ${project.parent.basedir}/utils/conf/db.properties + ${project.parent.basedir}/utils/conf/db.properties.override + + ${basedir}/target/db/create-schema-simulator.sql + ${basedir}/target/db/templates.simulator.sql + + com.cloud.upgrade.DatabaseUpgradeChecker + --database=simulator + --rootpassword=${db.root.password} + + +