cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: fix some pom xml files indentation, add db.root.passowrd, add utils/conf/db.properties.override, add to create user cloud
Date Tue, 09 Oct 2012 06:18:30 GMT
Updated Branches:
  refs/heads/maven-to-rpm 4b079cd3d -> b965f2354


fix some pom xml files indentation, add db.root.passowrd, add utils/conf/db.properties.override,
add to create user cloud


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b965f235
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b965f235
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b965f235

Branch: refs/heads/maven-to-rpm
Commit: b965f23548e3f7d11d93c04bb09a809d22fc4ad9
Parents: 4b079cd
Author: Edison Su <edison.su@citrix.com>
Authored: Mon Oct 8 23:18:00 2012 -0700
Committer: Edison Su <edison.su@citrix.com>
Committed: Mon Oct 8 23:18:00 2012 -0700

----------------------------------------------------------------------
 client/pom.xml           |  238 +++++++++---------
 developer/pom.xml        |  555 ++++++++++++++++++++++++-----------------
 utils/conf/db.properties |    1 +
 3 files changed, 446 insertions(+), 348 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b965f235/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 803b9aa..b4753f0 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -1,22 +1,15 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+  license agreements. See the NOTICE file distributed with this work for additional 
+  information regarding copyright ownership. The ASF licenses this file to 
+  you under the Apache License, Version 2.0 (the "License"); you may not use 
+  this file except in compliance with the License. You may obtain a copy of 
+  the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+  by applicable law or agreed to in writing, software distributed under the 
+  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+  OF ANY KIND, either express or implied. See the License for the specific 
+  language governing permissions and limitations under the License. -->
+<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/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>cloud-client-ui</artifactId>
   <name>Apache CloudStack Client UI</name>
@@ -151,25 +144,30 @@
             </goals>
             <configuration>
               <target>
-                <copy todir="${basedir}/target/generated-webapp/WEB-INF/classes">
+                <copy
+                  todir="${basedir}/target/generated-webapp/WEB-INF/classes">
                   <fileset dir="${basedir}/WEB-INF/classes">
                     <include name="resources/**/*" />
                   </fileset>
                 </copy>
-                <copy todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
+                <copy
+                  todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
                   <fileset dir="${basedir}/../scripts" />
                 </copy>
                 <copy todir="${basedir}/target/generated-webapp">
                   <fileset dir="${basedir}/../ui" />
                 </copy>
-                <copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes">
+                <copy overwrite="true"
+                  todir="${basedir}/target/generated-webapp/WEB-INF/classes">
                   <fileset dir="${basedir}/tomcatconf">
                     <include name="*.in" />
                   </fileset>
                   <globmapper from="*.in" to="*" />
                   <filterchain>
-                    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties"
/>
+                    <filterreader
+                      classname="org.apache.tools.ant.filters.ReplaceTokens">
+                      <param type="propertiesfile"
+                        value="${basedir}/../build/replace.properties" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -179,8 +177,10 @@
                   </fileset>
                   <globmapper from="*.in" to="*" />
                   <filterchain>
-                    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties"
/>
+                    <filterreader
+                      classname="org.apache.tools.ant.filters.ReplaceTokens">
+                      <param type="propertiesfile"
+                        value="${basedir}/../build/replace.properties" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -190,18 +190,23 @@
                   </fileset>
                   <globmapper from="*.in" to="*" />
                   <filterchain>
-                    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties"
/>
+                    <filterreader
+                      classname="org.apache.tools.ant.filters.ReplaceTokens">
+                      <param type="propertiesfile"
+                        value="${basedir}/../build/replace.properties" />
                     </filterreader>
                   </filterchain>
                 </copy>
-                <copy overwrite="true" todir="${basedir}/target/utilities/scripts/db">
+                <copy overwrite="true"
+                  todir="${basedir}/target/utilities/scripts/db">
                   <fileset dir="${basedir}/../setup/db">
                     <include name="**/*" />
                   </fileset>
                   <filterchain>
-                    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties"
/>
+                    <filterreader
+                      classname="org.apache.tools.ant.filters.ReplaceTokens">
+                      <param type="propertiesfile"
+                        value="${basedir}/../build/replace.properties" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -227,14 +232,16 @@
                 <artifactItem>
                   <groupId>org.jasypt</groupId>
                   <artifactId>jasypt</artifactId>
-                  <version>1.9.0</version>`
+                  <version>1.9.0</version>
+                  `
                   <overWrite>false</overWrite>
                   <outputDirectory>${project.build.directory}/pythonlibs</outputDirectory>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.jasypt</groupId>
                   <artifactId>jasypt</artifactId>
-                  <version>1.8</version>`
+                  <version>1.8</version>
+                  `
                   <overWrite>false</overWrite>
                   <outputDirectory>${project.build.directory}/pythonlibs</outputDirectory>
                 </artifactItem>
@@ -246,7 +253,8 @@
     </plugins>
     <pluginManagement>
       <plugins>
-        <!--This plugin's configuration is used to store Eclipse m2e settings only. It
has no influence on the Maven build itself.-->
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
+          only. It has no influence on the Maven build itself. -->
         <plugin>
           <groupId>org.eclipse.m2e</groupId>
           <artifactId>lifecycle-mapping</artifactId>
@@ -279,85 +287,85 @@
     </pluginManagement>
   </build>
   <profiles>
-	<profile>
-		<id>netapp</id>
-		<activation>
-			<property>
-				<name>nonoss</name>
-			</property>
-		</activation>
-		<dependencies>
-			<dependency>
-				<groupId>org.apache.cloudstack</groupId>
-				<artifactId>cloud-plugin-netapp</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</profile>
-	<profile>
-		<id>f5</id>
-		<activation>
-			<property>
-				<name>nonoss</name>
-			</property>
-		</activation>
-		<dependencies>
-			<dependency>
-				<groupId>org.apache.cloudstack</groupId>
-				<artifactId>cloud-plugin-network-f5</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</profile>
-	<profile>
-		<id>netscaler</id>
-		<activation>
-			<property>
-				<name>nonoss</name>
-			</property>
-		</activation>
-		<dependencies>
-			<dependency>
-				<groupId>org.apache.cloudstack</groupId>
-				<artifactId>cloud-plugin-network-netscaler</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</profile>
-	<profile>
-		<id>srx</id>
-		<activation>
-			<property>
-				<name>nonoss</name>
-			</property>
-		</activation>
-		<dependencies>
-			<dependency>
-				<groupId>org.apache.cloudstack</groupId>
-				<artifactId>cloud-plugin-network-srx</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</profile>
-	<profile>
-		<id>vmware</id>
-		<activation>
-			<property>
-				<name>nonoss</name>
-			</property>
-		</activation>
-		<dependencies>
-			<dependency>
-				<groupId>org.apache.cloudstack</groupId>
-				<artifactId>cloud-plugin-hypervisor-vmware</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-            <dependency>
-                <groupId>org.apache.cloudstack</groupId>
-                <artifactId>cloud-vmware-base</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-		</dependencies>
-	</profile>
-  </profiles>  
+    <profile>
+      <id>netapp</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-netapp</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>f5</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-network-f5</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>netscaler</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-network-netscaler</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>srx</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-network-srx</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>vmware</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-hypervisor-vmware</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-vmware-base</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b965f235/developer/pom.xml
----------------------------------------------------------------------
diff --git a/developer/pom.xml b/developer/pom.xml
index eb6e112..ffcb03d 100644
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@ -1,238 +1,327 @@
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
-	license agreements. See the NOTICE file distributed with this work for additional 
-	information regarding copyright ownership. The ASF licenses this file to 
-	you under the Apache License, Version 2.0 (the "License"); you may not use 
-	this file except in compliance with the License. You may obtain a copy of 
-	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
-	by applicable law or agreed to in writing, software distributed under the 
-	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
-	OF ANY KIND, either express or implied. See the License for the specific 
-	language governing permissions and limitations under the License. -->
-<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/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>cloud-developer</artifactId>
-	<name>Apache CloudStack Developer Tools</name>
-	<packaging>pom</packaging>
-	<parent>
-		<groupId>org.apache.cloudstack</groupId>
-		<artifactId>cloudstack</artifactId>
-		<version>4.1.0-SNAPSHOT</version>
-	</parent>
-	<dependencies>
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-			<version>5.1.21</version>
-			<scope>runtime</scope>
-		</dependency>
-	</dependencies>
-	<build>
-		<defaultGoal>install</defaultGoal>
-	</build>
+  license agreements. See the NOTICE file distributed with this work for additional 
+  information regarding copyright ownership. The ASF licenses this file to 
+  you under the Apache License, Version 2.0 (the "License"); you may not use 
+  this file except in compliance with the License. You may obtain a copy of 
+  the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+  by applicable law or agreed to in writing, software distributed under the 
+  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+  OF ANY KIND, either express or implied. See the License for the specific 
+  language governing permissions and limitations under the License. -->
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cloud-developer</artifactId>
+  <name>Apache CloudStack Developer Tools</name>
+  <packaging>pom</packaging>
+  <parent>
+    <groupId>org.apache.cloudstack</groupId>
+    <artifactId>cloudstack</artifactId>
+    <version>4.1.0-SNAPSHOT</version>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>5.1.21</version>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <defaultGoal>install</defaultGoal>
+  </build>
 
-	<profiles>
-		<profile>
-			<id>deploydb</id>
-			<activation>
-				<property>
-					<name>deploydb</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>
-									</files>
-								</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/">
-											</fileset>
-										</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>
+  <profiles>
+    <profile>
+      <id>deploydb</id>
+      <activation>
+        <property>
+          <name>deploydb</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/">
+                      </fileset>
+                    </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>
-							<execution>
-								<id>drop-database</id>
-								<phase>process-test-resources</phase>
-								<goals>
-									<goal>execute</goal>
-								</goals>
-								<configuration>
-									<username>root</username>
-									<password>${db.cloud.password}</password>
-									<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-									<sqlCommand>drop database if exists `cloud`</sqlCommand>
-								</configuration>
-							</execution>
-                            <execution>
-                                <id>create-database</id>
-                                <phase>process-test-resources</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <username>root</username>
-                                    <password>${db.cloud.password}</password>
-                                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-                                    <sqlCommand>create database `cloud`</sqlCommand>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>drop-database-usage</id>
-                                <phase>process-test-resources</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <username>root</username>
-                                    <password>${db.cloud.password}</password>
-                                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-                                    <sqlCommand>drop database if exists `cloud_usage`</sqlCommand>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>create-database-usage</id>
-                                <phase>process-test-resources</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <username>root</username>
-                                    <password>${db.cloud.password}</password>
-                                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-                                    <sqlCommand>create database `cloud_usage`</sqlCommand>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>drop-database-cloudbridge</id>
-                                <phase>process-test-resources</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <username>root</username>
-                                    <password>${db.cloud.password}</password>
-                                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-                                    <sqlCommand>drop database if exists `cloudbridge`</sqlCommand>
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>create-database-cloudbridge</id>
-                                <phase>process-test-resources</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <username>root</username>
-                                    <password>${db.cloud.password}</password>
-                                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
-                                    <sqlCommand>create database `cloudbridge`</sqlCommand>
-                                </configuration>
-                            </execution>
-							<execution>
-								<id>create-schema</id>
-								<phase>process-test-resources</phase>
-								<goals>
-									<goal>execute</goal>
-								</goals>
-								<configuration>
-									<srcFiles>
-										<srcFile>${basedir}/target/db/create-schema.sql</srcFile>
-										<srcFile>${basedir}/target/db/create-schema-premium.sql</srcFile>
-										<srcFile>${basedir}/target/db/templates.sql</srcFile>
-										<srcFile>${basedir}/target/db/create-index-fk.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>
-	</profiles>
+            <executions>
+              <execution>
+                <id>drop-database</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>drop database if exists `cloud`</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>create-database</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 `cloud`</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>grant-user-cloud</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>GRANT ALL ON cloud.* to ${db.cloud.username}@`localhost`
identified by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+               <execution>
+                <id>grant-user-cloud-all</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>GRANT ALL ON cloud.* to ${db.cloud.username}@`%` identified
by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>drop-database-usage</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>drop database if exists `cloud_usage`</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>create-database-usage</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 `cloud_usage`</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>grant-user-cloud-usage</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>GRANT ALL ON cloud_usage.* to ${db.cloud.username}@`localhost`
identified by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+               <execution>
+                <id>grant-user-cloud-usage-all</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>GRANT ALL ON cloud_usage.* to ${db.cloud.username}@`%`
identified by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>drop-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>drop database if exists `cloudbridge`</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <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-cloud-bridge</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>GRANT ALL ON cloudbridge.* to ${db.cloud.username}@`localhost`
identified by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+               <execution>
+                <id>grant-user-cloud-bridge-all</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>GRANT ALL ON cloudbridge.* to ${db.cloud.username}@`%`
identified by '${db.cloud.password}';</sqlCommand>
+                </configuration>
+              </execution>
+              <execution>
+                <id>create-schema</id>
+                <phase>process-test-resources</phase>
+                <goals>
+                  <goal>execute</goal>
+                </goals>
+                <configuration>
+                  <srcFiles>
+                    <srcFile>${basedir}/target/db/create-schema.sql</srcFile>
+                    <srcFile>${basedir}/target/db/create-schema-premium.sql</srcFile>
+                    <srcFile>${basedir}/target/db/templates.sql</srcFile>
+                    <srcFile>${basedir}/target/db/create-index-fk.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>
+  </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b965f235/utils/conf/db.properties
----------------------------------------------------------------------
diff --git a/utils/conf/db.properties b/utils/conf/db.properties
index 6bdb6d6..8d98119 100644
--- a/utils/conf/db.properties
+++ b/utils/conf/db.properties
@@ -24,6 +24,7 @@ cluster.servlet.port=9090
 # CloudStack database settings
 db.cloud.username=cloud
 db.cloud.password=cloud
+db.root.password=
 db.cloud.host=localhost
 db.cloud.port=3306
 db.cloud.name=cloud


Mime
View raw message