mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
maven: Fix deploydb in developer/pom.xml to pass through DatabaseCreator
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
ef07cde449
commit
cafe881acb
@ -77,7 +77,6 @@
|
|||||||
<filter token="VERSION" value="${project.version}" />
|
<filter token="VERSION" value="${project.version}" />
|
||||||
<copy todir="${basedir}/target/db" filtering="true">
|
<copy todir="${basedir}/target/db" filtering="true">
|
||||||
<fileset dir="${project.basedir}/../setup/db/" />
|
<fileset dir="${project.basedir}/../setup/db/" />
|
||||||
|
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${basedir}/target/db" filtering="true">
|
<copy todir="${basedir}/target/db" filtering="true">
|
||||||
<fileset
|
<fileset
|
||||||
@ -91,71 +90,7 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- DatabaseCreator driver here -->
|
<!-- Database recreator -->
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<version>1.2.1</version>
|
|
||||||
<dependencies>
|
|
||||||
<!-- specify the dependent jdbc driver here -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>${cs.mysql.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-dbcp</groupId>
|
|
||||||
<artifactId>commons-dbcp</artifactId>
|
|
||||||
<version>${cs.dbcp.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-pool</groupId>
|
|
||||||
<artifactId>commons-pool</artifactId>
|
|
||||||
<version>${cs.pool.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jasypt</groupId>
|
|
||||||
<artifactId>jasypt</artifactId>
|
|
||||||
<version>${cs.jasypt.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
|
||||||
<artifactId>cloud-utils</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
|
||||||
<artifactId>cloud-server</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<id>create-schema</id>
|
|
||||||
<goals>
|
|
||||||
<goal>java</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<includeProjectDependencies>false</includeProjectDependencies>
|
|
||||||
<includePluginDependencies>true</includePluginDependencies>
|
|
||||||
<executableDependency>
|
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
|
||||||
<artifactId>cloud-server</artifactId>
|
|
||||||
</executableDependency>
|
|
||||||
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
|
|
||||||
<arguments>
|
|
||||||
<argument>${basedir}/target/db/create-schema.sql</argument>
|
|
||||||
<argument>${basedir}/target/db/4.1-new-db-schema.sql</argument>
|
|
||||||
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
|
|
||||||
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<!-- Database schema deployer and db prefill seeder -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>sql-maven-plugin</artifactId>
|
<artifactId>sql-maven-plugin</artifactId>
|
||||||
@ -300,13 +235,24 @@
|
|||||||
<username>root</username>
|
<username>root</username>
|
||||||
<password>${db.root.password}</password>
|
<password>${db.root.password}</password>
|
||||||
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
|
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
|
||||||
<sqlCommand>GRANT ALL ON cloud_usage.* to
|
<sqlCommand>drop database if exists `cloudbridge`</sqlCommand>
|
||||||
${db.cloud.username}@`localhost` identified by
|
|
||||||
'${db.cloud.password}';</sqlCommand>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>grant-user-cloud-bridge</id>
|
<id>create-database-cloudbridge</id>
|
||||||
|
<phase>process-test-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>execute</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<username>root</username>
|
||||||
|
<password>${db.root.password}</password>
|
||||||
|
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
|
||||||
|
<sqlCommand>create database `cloudbridge`</sqlCommand>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>grant-user-cloudbridge</id>
|
||||||
<phase>process-test-resources</phase>
|
<phase>process-test-resources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>execute</goal>
|
<goal>execute</goal>
|
||||||
@ -321,7 +267,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>grant-user-cloud-bridge-all</id>
|
<id>grant-user-cloudbridge-all</id>
|
||||||
<phase>process-test-resources</phase>
|
<phase>process-test-resources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>execute</goal>
|
<goal>execute</goal>
|
||||||
@ -335,43 +281,89 @@
|
|||||||
'${db.cloud.password}';</sqlCommand>
|
'${db.cloud.password}';</sqlCommand>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- DatabaseCreator driver here -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
<dependencies>
|
||||||
|
<!-- specify the dependent jdbc driver here -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${cs.mysql.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-dbcp</groupId>
|
||||||
|
<artifactId>commons-dbcp</artifactId>
|
||||||
|
<version>${cs.dbcp.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-pool</groupId>
|
||||||
|
<artifactId>commons-pool</artifactId>
|
||||||
|
<version>${cs.pool.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jasypt</groupId>
|
||||||
|
<artifactId>jasypt</artifactId>
|
||||||
|
<version>${cs.jasypt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-utils</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
<phase>process-test-resources</phase>
|
||||||
<id>create-schema</id>
|
<id>create-schema</id>
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
<goals>
|
||||||
<goal>execute</goal>
|
<goal>java</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
|
||||||
<srcFiles>
|
|
||||||
<srcFile>${basedir}/target/db/create-schema.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/create-schema-view.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/create-schema-premium.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/templates.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_schema.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_multipart.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_index.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_multipart_alter.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_bucketpolicy.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_policy_alter.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_offering.sql</srcFile>
|
|
||||||
<srcFile>${basedir}/target/db/cloudbridge_offering_alter.sql</srcFile>
|
|
||||||
</srcFiles>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>prefill-developer-schema</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>execute</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<autocommit>true</autocommit>
|
|
||||||
<srcFiles>
|
|
||||||
<srcFile>${basedir}/developer-prefill.sql</srcFile>
|
|
||||||
</srcFiles>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<includeProjectDependencies>false</includeProjectDependencies>
|
||||||
|
<includePluginDependencies>true</includePluginDependencies>
|
||||||
|
<executableDependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-server</artifactId>
|
||||||
|
</executableDependency>
|
||||||
|
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
|
||||||
|
<arguments>
|
||||||
|
<!-- Create default schema and db table views -->
|
||||||
|
<argument>${basedir}/target/db/create-schema.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
|
||||||
|
<!-- Create schema view -->
|
||||||
|
<argument>${basedir}/target/db/create-schema-view.sql</argument>
|
||||||
|
<!-- Create any new db schema -->
|
||||||
|
<argument>${basedir}/target/db/4.1-new-db-schema.sql</argument>
|
||||||
|
<!-- Seed templates -->
|
||||||
|
<argument>${basedir}/target/db/templates.sql</argument>
|
||||||
|
<!-- Run cloudbridge related sqls -->
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_schema.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_multipart.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_index.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_multipart_alter.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_bucketpolicy.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_policy_alter.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_offering.sql</argument>
|
||||||
|
<argument>${basedir}/target/db/cloudbridge_offering_alter.sql</argument>
|
||||||
|
<!-- Seed the database -->
|
||||||
|
<argument>${basedir}/developer-prefill.sql</argument>
|
||||||
|
<!-- Do database upgrade-->
|
||||||
|
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user