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

Conflicts:

	pom.xml
This commit is contained in:
Edison Su 2012-10-19 15:27:19 -07:00
parent 8ef9e32cfd
commit f6ac4dbe5d
3 changed files with 405 additions and 234 deletions

View File

@ -1,238 +1,335 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to information regarding copyright ownership. The ASF licenses this file to
you under the Apache License, Version 2.0 (the "License"); you may not use 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 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 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 by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. --> 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"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>cloud-developer</artifactId> <modelVersion>4.0.0</modelVersion>
<name>Apache CloudStack Developer Tools</name> <artifactId>cloud-developer</artifactId>
<packaging>pom</packaging> <name>Apache CloudStack Developer Tools</name>
<parent> <packaging>pom</packaging>
<groupId>org.apache.cloudstack</groupId> <parent>
<artifactId>cloudstack</artifactId> <groupId>org.apache.cloudstack</groupId>
<version>4.1.0-SNAPSHOT</version> <artifactId>cloudstack</artifactId>
</parent> <version>4.1.0-SNAPSHOT</version>
<dependencies> </parent>
<dependency> <dependencies>
<groupId>mysql</groupId> <dependency>
<artifactId>mysql-connector-java</artifactId> <groupId>mysql</groupId>
<version>5.1.21</version> <artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope> <version>5.1.21</version>
</dependency> <scope>runtime</scope>
</dependencies> </dependency>
<build> </dependencies>
<defaultGoal>install</defaultGoal> <build>
</build> <defaultGoal>install</defaultGoal>
</build>
<profiles> <profiles>
<profile> <profile>
<id>deploydb</id> <id>deploydb</id>
<activation> <activation>
<property> <property>
<name>deploydb</name> <name>deploydb</name>
</property> </property>
</activation> </activation>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId> <artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version> <version>1.0-alpha-2</version>
<executions> <executions>
<execution> <execution>
<phase>initialize</phase> <phase>initialize</phase>
<goals> <goals>
<goal>read-project-properties</goal> <goal>read-project-properties</goal>
</goals> </goals>
<configuration> <configuration>
<files> <files>
<file>${project.parent.basedir}/utils/conf/db.properties</file> <file>${project.parent.basedir}/utils/conf/db.properties</file>
</files> <file>${project.parent.basedir}/utils/conf/db.properties.override</file>
</configuration> </files>
</execution> </configuration>
</executions> </execution>
</plugin> </executions>
<plugin> </plugin>
<artifactId>maven-antrun-plugin</artifactId> <plugin>
<version>1.7</version> <artifactId>maven-antrun-plugin</artifactId>
<executions> <version>1.7</version>
<execution> <executions>
<phase>generate-resources</phase> <execution>
<goals> <phase>generate-resources</phase>
<goal>run</goal> <goals>
</goals> <goal>run</goal>
<configuration> </goals>
<target> <configuration>
<filter token="VERSION" value="${project.version}" /> <target>
<copy todir="${basedir}/target/db" filtering="true"> <filter token="VERSION" value="${project.version}" />
<fileset dir="${project.basedir}/../setup/db/"> <copy todir="${basedir}/target/db" filtering="true">
</fileset> <fileset dir="${project.basedir}/../setup/db/">
</copy> </fileset>
<copy todir="${basedir}/target/db" filtering="true"> </copy>
<fileset dir="${project.basedir}/../awsapi-setup/db/mysql/"> <copy todir="${basedir}/target/db" filtering="true">
<include name="**/*.sql" /> <fileset
</fileset> dir="${project.basedir}/../awsapi-setup/db/mysql/">
</copy> <include name="**/*.sql" />
</target> </fileset>
</configuration> </copy>
</execution> </target>
</executions> </configuration>
</plugin> </execution>
<plugin> </executions>
<groupId>org.codehaus.mojo</groupId> </plugin>
<artifactId>sql-maven-plugin</artifactId> <plugin>
<version>1.5</version> <groupId>org.codehaus.mojo</groupId>
<dependencies> <artifactId>sql-maven-plugin</artifactId>
<!-- specify the dependent jdbc driver here --> <version>1.5</version>
<dependency> <dependencies>
<groupId>mysql</groupId> <!-- specify the dependent jdbc driver here -->
<artifactId>mysql-connector-java</artifactId> <dependency>
<version>${cs.mysql.version}</version> <groupId>mysql</groupId>
</dependency> <artifactId>mysql-connector-java</artifactId>
</dependencies> <version>${cs.mysql.version}</version>
<configuration> </dependency>
<driver>org.gjt.mm.mysql.Driver</driver> </dependencies>
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url> <configuration>
<username>${db.cloud.username}</username> <driver>org.gjt.mm.mysql.Driver</driver>
<password>${db.cloud.password}</password> <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url>
<!--all executions are ignored if -Dmaven.test.skip=true --> <username>${db.cloud.username}</username>
<skip>${maven.test.skip}</skip> <password>${db.cloud.password}</password>
<forceMojoExecution>true</forceMojoExecution> <!--all executions are ignored if -Dmaven.test.skip=true -->
</configuration> <skip>${maven.test.skip}</skip>
<forceMojoExecution>true</forceMojoExecution>
<executions> </configuration>
<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> </project>

View File

@ -161,6 +161,7 @@
<module>test</module> <module>test</module>
<module>platform</module> <module>platform</module>
<module>framework</module> <module>framework</module>
<module>tools/devcloud</module>
</modules> </modules>
<dependencies> <dependencies>

73
tools/devcloud/pom.xml Normal file
View File

@ -0,0 +1,73 @@
<!-- 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-devcloud</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>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
<defaultGoal>install</defaultGoal>
</build>
<profiles>
<profile>
<id>clean</id>
<activation>
<property>
<name>clean</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<sshexec host="localhost" username="root"
password="password" port="2222" command="touch /tmp/x"
trust="true" />
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>jsch</groupId>
<artifactId>jsch</artifactId>
<version>0.1.29</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>