mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
maven: Fix deploydb in developer/pom.xml
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
2be270de89
commit
1db3a84a03
@ -90,6 +90,8 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- DatabaseCreator driver here -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
@ -152,6 +154,8 @@
|
|||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
||||||
@ -173,136 +177,6 @@
|
|||||||
<skip>${maven.test.skip}</skip>
|
<skip>${maven.test.skip}</skip>
|
||||||
<forceMojoExecution>true</forceMojoExecution>
|
<forceMojoExecution>true</forceMojoExecution>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>create-other-schema</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>execute</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<srcFiles>
|
|
||||||
<srcFile>${basedir}/target/db/create-schema-view.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-schema</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>execute</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sqlCommand>INSERT INTO `cloud`.`domain` (id, name,
|
|
||||||
parent, path, owner) VALUES (1, 'ROOT', NULL, '/',
|
|
||||||
2)</sqlCommand>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>prefill-configuration</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>execute</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sqlCommand>INSERT INTO `cloud`.`configuration`
|
|
||||||
(category, instance, component, name, value) VALUES
|
|
||||||
('Hidden', 'DEFAULT', 'management-server', 'init',
|
|
||||||
'false')</sqlCommand>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>cleandb</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>cleandb</name>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>properties-maven-plugin</artifactId>
|
|
||||||
<version>1.0-alpha-2</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>initialize</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>read-project-properties</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<files>
|
|
||||||
<file>${project.parent.basedir}/utils/conf/db.properties</file>
|
|
||||||
<file>${project.parent.basedir}/utils/conf/db.properties.override</file>
|
|
||||||
</files>
|
|
||||||
<quiet>true</quiet>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<version>1.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<filter token="VERSION" value="${project.version}" />
|
|
||||||
<copy todir="${basedir}/target/db" filtering="true">
|
|
||||||
<fileset dir="${project.basedir}/../setup/db/" />
|
|
||||||
|
|
||||||
</copy>
|
|
||||||
<copy todir="${basedir}/target/db" filtering="true">
|
|
||||||
<fileset
|
|
||||||
dir="${project.basedir}/../awsapi-setup/db/mysql/">
|
|
||||||
<include name="**/*.sql" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>sql-maven-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<dependencies>
|
|
||||||
<!-- specify the dependent jdbc driver here -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>${cs.mysql.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<configuration>
|
|
||||||
|
|
||||||
<driver>org.gjt.mm.mysql.Driver</driver>
|
|
||||||
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url>
|
|
||||||
<username>${db.cloud.username}</username>
|
|
||||||
<password>${db.cloud.password}</password>
|
|
||||||
<!--all executions are ignored if -Dmaven.test.skip=true -->
|
|
||||||
<skip>${maven.test.skip}</skip>
|
|
||||||
<forceMojoExecution>true</forceMojoExecution>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>drop-database</id>
|
<id>drop-database</id>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user