mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
maven pom: put apache cloudstack tools together in umbrella pom
minor pom refactor to put all the tools under one placeholder pom. Also adds a profile for marvin to run deployDataCenter via mvn options. $mvn -Pdeveloper,marvin -pl :cloud-marvin -Dmarvin.config=<path/to/config> OR $cd tools/marvin $mvn -Pmarvin -pl :cloud-marvin -Dmarvin.config=path/to/config will deploy the datacenter using the marvin.config property's value Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
1dd40518a4
commit
05437d0e97
@ -27,7 +27,12 @@
|
||||
<version>5.1.21</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
@ -189,114 +194,6 @@
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Simulator profile -->
|
||||
<profile>
|
||||
<id>simulator</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>deploydb-simulator</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>
|
||||
<!-- 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>
|
||||
<phase>process-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>
|
||||
<!-- db properties file -->
|
||||
<argument>${project.parent.basedir}/utils/conf/db.properties</argument>
|
||||
<argument>${project.parent.basedir}/utils/conf/db.properties.override</argument>
|
||||
<!-- simulator sql files -->
|
||||
<argument>${basedir}/target/db/create-schema-simulator.sql</argument>
|
||||
<argument>${basedir}/target/db/templates.simulator.sql</argument>
|
||||
<!-- database upgrade-->
|
||||
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
|
||||
<argument>--database=simulator</argument>
|
||||
<argument>--rootpassword=${db.root.password}</argument>
|
||||
<!-- enable verbosity by -v or dash-dash-verbose -->
|
||||
</arguments>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<key>catalina.home</key>
|
||||
<value>${project.parent.basedir}/utils</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
117
pom.xml
117
pom.xml
@ -504,13 +504,12 @@
|
||||
</profile>
|
||||
<profile>
|
||||
<id>developer</id>
|
||||
<properties>
|
||||
<marvin.config>tools/devcloud/devcloud.cfg</marvin.config>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>developer</module>
|
||||
<module>tools/apidoc</module>
|
||||
<module>tools/devcloud</module>
|
||||
<module>tools/devcloud-kvm</module>
|
||||
<module>tools/marvin</module>
|
||||
<module>tools/cli</module>
|
||||
<module>tools</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
@ -524,5 +523,113 @@
|
||||
<module>vmware-base</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>simulator</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>deploydb-simulator</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.basedir}/utils/conf/db.properties</file>
|
||||
<file>${project.basedir}/utils/conf/db.properties.override</file>
|
||||
</files>
|
||||
<quiet>true</quiet>
|
||||
</configuration>
|
||||
</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>
|
||||
<phase>process-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>
|
||||
<!-- db properties file -->
|
||||
<argument>${project.basedir}/utils/conf/db.properties</argument>
|
||||
<argument>${project.basedir}/utils/conf/db.properties.override</argument>
|
||||
<!-- simulator sql files -->
|
||||
<argument>${basedir}/target/db/create-schema-simulator.sql</argument>
|
||||
<argument>${basedir}/target/db/templates.simulator.sql</argument>
|
||||
<!-- database upgrade-->
|
||||
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
|
||||
<argument>--database=simulator</argument>
|
||||
<argument>--rootpassword=${db.root.password}</argument>
|
||||
<!-- enable verbosity by -v or dash-dash-verbose -->
|
||||
</arguments>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<key>catalina.home</key>
|
||||
<value>${project.basedir}/utils</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@ -12,22 +12,14 @@
|
||||
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-apidoc</artifactId>
|
||||
<name>Apache CloudStack apidoc Tools</name>
|
||||
<name>Apache CloudStack apidocs</name>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-client-ui</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<client.config.base>../../client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/</client.config.base>
|
||||
<client.config.jars>${client.config.base}/lib</client.config.jars>
|
||||
|
||||
@ -20,13 +20,13 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-cli</artifactId>
|
||||
<name>Apache CloudStack Developer Tools: cloudmonkey cli</name>
|
||||
<name>Apache CloudStack cloudmonkey cli</name>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@ -19,16 +19,16 @@
|
||||
import configGenerator
|
||||
import cloudstackException
|
||||
import cloudstackTestClient
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
from cloudstackAPI import *
|
||||
from os import path
|
||||
from optparse import OptionParser
|
||||
|
||||
class deployDataCenters():
|
||||
|
||||
def __init__(self, cfgFile):
|
||||
if not os.path.exists(cfgFile):
|
||||
if not path.exists(cfgFile) \
|
||||
and not path.exists(path.abspath(cfgFile)):
|
||||
raise IOError("config file %s not found. please specify a valid config file"%cfgFile)
|
||||
self.configFile = cfgFile
|
||||
|
||||
@ -444,7 +444,7 @@ if __name__ == "__main__":
|
||||
|
||||
parser = OptionParser()
|
||||
|
||||
parser.add_option("-i", "--intput", action="store", \
|
||||
parser.add_option("-i", "--input", action="store", \
|
||||
default="./datacenterCfg", dest="input", help="the path \
|
||||
where the json config file generated, by default is \
|
||||
./datacenterCfg")
|
||||
|
||||
@ -12,15 +12,14 @@
|
||||
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-marvin</artifactId>
|
||||
<name>Apache CloudStack Developer Tools: marvin</name>
|
||||
<name>Apache CloudStack marvin</name>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<artifactId>cloud-tools</artifactId>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<plugins>
|
||||
@ -29,14 +28,15 @@
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-resource</id>
|
||||
<phase>generate-resources</phase>
|
||||
<id>clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete dir="marvin/cloudstackAPI"/>
|
||||
<delete dir="marvin/cloudstackAPI"/>
|
||||
<echo>Deleting ${project.artifactId} API sources</echo>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -54,12 +54,13 @@
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>marvin</workingDirectory>
|
||||
<workingDirectory>${basedir}/marvin</workingDirectory>
|
||||
<executable>python</executable>
|
||||
<arguments>
|
||||
<argument>codegenerator.py</argument>
|
||||
<argument>-s</argument>
|
||||
<argument>${basedir}/../apidoc/target/commands.xml</argument>
|
||||
<echo>Generating ${project.artifactId} API classes}</echo>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -78,23 +79,42 @@
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>deploy</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>dist</workingDirectory>
|
||||
<executable>pip</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
<argument>Marvin-0.1.0.tar.gz</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>marvin</id>
|
||||
<activation>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<workingDirectory>${basedir}/marvin</workingDirectory>
|
||||
<executable>python</executable>
|
||||
<arguments>
|
||||
<argument>deployDataCenter.py</argument>
|
||||
<argument>-i</argument>
|
||||
<argument>${user.dir}/${marvin.config}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
44
tools/pom.xml
Normal file
44
tools/pom.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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>
|
||||
|
||||
<name>Apache CloudStack Developer Tools</name>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-tools</artifactId>
|
||||
<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>
|
||||
<modules>
|
||||
<module>apidoc</module>
|
||||
<module>marvin</module>
|
||||
<module>cli</module>
|
||||
<module>devcloud</module>
|
||||
<module>devcloud-kvm</module>
|
||||
</modules>
|
||||
</project>
|
||||
Loading…
x
Reference in New Issue
Block a user