Skip to content

Commit 05437d0

Browse files
author
Prasanna Santhanam
committed
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 <[email protected]>
1 parent 1dd4051 commit 05437d0

9 files changed

Lines changed: 216 additions & 156 deletions

File tree

developer/pom.xml

Lines changed: 7 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
<version>5.1.21</version>
2828
<scope>runtime</scope>
2929
</dependency>
30-
30+
<dependency>
31+
<groupId>org.apache.cloudstack</groupId>
32+
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
33+
<version>${project.version}</version>
34+
<scope>compile</scope>
35+
</dependency>
3136
</dependencies>
3237
<build>
3338
<defaultGoal>install</defaultGoal>
@@ -189,114 +194,6 @@
189194
</build>
190195
</profile>
191196

192-
<!-- Simulator profile -->
193-
<profile>
194-
<id>simulator</id>
195-
<activation>
196-
<property>
197-
<name>deploydb-simulator</name>
198-
</property>
199-
</activation>
200-
<build>
201-
<plugins>
202-
<plugin>
203-
<groupId>org.codehaus.mojo</groupId>
204-
<artifactId>properties-maven-plugin</artifactId>
205-
<version>1.0-alpha-2</version>
206-
<executions>
207-
<execution>
208-
<phase>initialize</phase>
209-
<goals>
210-
<goal>read-project-properties</goal>
211-
</goals>
212-
<configuration>
213-
<files>
214-
<file>${project.parent.basedir}/utils/conf/db.properties</file>
215-
<file>${project.parent.basedir}/utils/conf/db.properties.override</file>
216-
</files>
217-
<quiet>true</quiet>
218-
</configuration>
219-
</execution>
220-
</executions>
221-
</plugin>
222-
<!-- DatabaseCreator driver here -->
223-
<plugin>
224-
<groupId>org.codehaus.mojo</groupId>
225-
<artifactId>exec-maven-plugin</artifactId>
226-
<version>1.2.1</version>
227-
<dependencies>
228-
<!-- specify the dependent jdbc driver here -->
229-
<dependency>
230-
<groupId>mysql</groupId>
231-
<artifactId>mysql-connector-java</artifactId>
232-
<version>${cs.mysql.version}</version>
233-
</dependency>
234-
<dependency>
235-
<groupId>commons-dbcp</groupId>
236-
<artifactId>commons-dbcp</artifactId>
237-
<version>${cs.dbcp.version}</version>
238-
</dependency>
239-
<dependency>
240-
<groupId>commons-pool</groupId>
241-
<artifactId>commons-pool</artifactId>
242-
<version>${cs.pool.version}</version>
243-
</dependency>
244-
<dependency>
245-
<groupId>org.jasypt</groupId>
246-
<artifactId>jasypt</artifactId>
247-
<version>${cs.jasypt.version}</version>
248-
</dependency>
249-
<dependency>
250-
<groupId>org.apache.cloudstack</groupId>
251-
<artifactId>cloud-utils</artifactId>
252-
<version>${project.version}</version>
253-
</dependency>
254-
<dependency>
255-
<groupId>org.apache.cloudstack</groupId>
256-
<artifactId>cloud-server</artifactId>
257-
<version>${project.version}</version>
258-
</dependency>
259-
</dependencies>
260-
<executions>
261-
<execution>
262-
<phase>process-resources</phase>
263-
<id>create-schema</id>
264-
<goals>
265-
<goal>java</goal>
266-
</goals>
267-
</execution>
268-
</executions>
269-
<configuration>
270-
<includeProjectDependencies>false</includeProjectDependencies>
271-
<includePluginDependencies>true</includePluginDependencies>
272-
<executableDependency>
273-
<groupId>org.apache.cloudstack</groupId>
274-
<artifactId>cloud-server</artifactId>
275-
</executableDependency>
276-
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
277-
<arguments>
278-
<!-- db properties file -->
279-
<argument>${project.parent.basedir}/utils/conf/db.properties</argument>
280-
<argument>${project.parent.basedir}/utils/conf/db.properties.override</argument>
281-
<!-- simulator sql files -->
282-
<argument>${basedir}/target/db/create-schema-simulator.sql</argument>
283-
<argument>${basedir}/target/db/templates.simulator.sql</argument>
284-
<!-- database upgrade-->
285-
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
286-
<argument>--database=simulator</argument>
287-
<argument>--rootpassword=${db.root.password}</argument>
288-
<!-- enable verbosity by -v or dash-dash-verbose -->
289-
</arguments>
290-
<systemProperties>
291-
<systemProperty>
292-
<key>catalina.home</key>
293-
<value>${project.parent.basedir}/utils</value>
294-
</systemProperty>
295-
</systemProperties>
296-
</configuration>
297-
</plugin>
298-
</plugins>
299-
</build>
300-
</profile>
197+
301198
</profiles>
302199
</project>

pom.xml

Lines changed: 112 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,12 @@
504504
</profile>
505505
<profile>
506506
<id>developer</id>
507+
<properties>
508+
<marvin.config>tools/devcloud/devcloud.cfg</marvin.config>
509+
</properties>
507510
<modules>
508511
<module>developer</module>
509-
<module>tools/apidoc</module>
510-
<module>tools/devcloud</module>
511-
<module>tools/devcloud-kvm</module>
512-
<module>tools/marvin</module>
513-
<module>tools/cli</module>
512+
<module>tools</module>
514513
</modules>
515514
</profile>
516515
<profile>
@@ -524,5 +523,113 @@
524523
<module>vmware-base</module>
525524
</modules>
526525
</profile>
526+
<profile>
527+
<id>simulator</id>
528+
<activation>
529+
<property>
530+
<name>deploydb-simulator</name>
531+
</property>
532+
</activation>
533+
<build>
534+
<plugins>
535+
<plugin>
536+
<groupId>org.codehaus.mojo</groupId>
537+
<artifactId>properties-maven-plugin</artifactId>
538+
<version>1.0-alpha-2</version>
539+
<executions>
540+
<execution>
541+
<phase>initialize</phase>
542+
<goals>
543+
<goal>read-project-properties</goal>
544+
</goals>
545+
<configuration>
546+
<files>
547+
<file>${project.basedir}/utils/conf/db.properties</file>
548+
<file>${project.basedir}/utils/conf/db.properties.override</file>
549+
</files>
550+
<quiet>true</quiet>
551+
</configuration>
552+
</execution>
553+
</executions>
554+
</plugin>
555+
<!-- DatabaseCreator driver here -->
556+
<plugin>
557+
<groupId>org.codehaus.mojo</groupId>
558+
<artifactId>exec-maven-plugin</artifactId>
559+
<version>1.2.1</version>
560+
<dependencies>
561+
<!-- specify the dependent jdbc driver here -->
562+
<dependency>
563+
<groupId>mysql</groupId>
564+
<artifactId>mysql-connector-java</artifactId>
565+
<version>${cs.mysql.version}</version>
566+
</dependency>
567+
<dependency>
568+
<groupId>commons-dbcp</groupId>
569+
<artifactId>commons-dbcp</artifactId>
570+
<version>${cs.dbcp.version}</version>
571+
</dependency>
572+
<dependency>
573+
<groupId>commons-pool</groupId>
574+
<artifactId>commons-pool</artifactId>
575+
<version>${cs.pool.version}</version>
576+
</dependency>
577+
<dependency>
578+
<groupId>org.jasypt</groupId>
579+
<artifactId>jasypt</artifactId>
580+
<version>${cs.jasypt.version}</version>
581+
</dependency>
582+
<dependency>
583+
<groupId>org.apache.cloudstack</groupId>
584+
<artifactId>cloud-utils</artifactId>
585+
<version>${project.version}</version>
586+
</dependency>
587+
<dependency>
588+
<groupId>org.apache.cloudstack</groupId>
589+
<artifactId>cloud-server</artifactId>
590+
<version>${project.version}</version>
591+
</dependency>
592+
</dependencies>
593+
<executions>
594+
<execution>
595+
<phase>process-resources</phase>
596+
<id>create-schema</id>
597+
<goals>
598+
<goal>java</goal>
599+
</goals>
600+
</execution>
601+
</executions>
602+
<configuration>
603+
<includeProjectDependencies>false</includeProjectDependencies>
604+
<includePluginDependencies>true</includePluginDependencies>
605+
<executableDependency>
606+
<groupId>org.apache.cloudstack</groupId>
607+
<artifactId>cloud-server</artifactId>
608+
</executableDependency>
609+
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
610+
<arguments>
611+
<!-- db properties file -->
612+
<argument>${project.basedir}/utils/conf/db.properties</argument>
613+
<argument>${project.basedir}/utils/conf/db.properties.override</argument>
614+
<!-- simulator sql files -->
615+
<argument>${basedir}/target/db/create-schema-simulator.sql</argument>
616+
<argument>${basedir}/target/db/templates.simulator.sql</argument>
617+
<!-- database upgrade-->
618+
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
619+
<argument>--database=simulator</argument>
620+
<argument>--rootpassword=${db.root.password}</argument>
621+
<!-- enable verbosity by -v or dash-dash-verbose -->
622+
</arguments>
623+
<systemProperties>
624+
<systemProperty>
625+
<key>catalina.home</key>
626+
<value>${project.basedir}/utils</value>
627+
</systemProperty>
628+
</systemProperties>
629+
</configuration>
630+
</plugin>
631+
</plugins>
632+
</build>
633+
</profile>
527634
</profiles>
528635
</project>

tools/apidoc/pom.xml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,14 @@
1212
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1313
<modelVersion>4.0.0</modelVersion>
1414
<artifactId>cloud-apidoc</artifactId>
15-
<name>Apache CloudStack apidoc Tools</name>
15+
<name>Apache CloudStack apidocs</name>
1616
<packaging>pom</packaging>
1717
<parent>
1818
<groupId>org.apache.cloudstack</groupId>
1919
<artifactId>cloudstack</artifactId>
2020
<version>4.1.0-SNAPSHOT</version>
21-
<relativePath>../../pom.xml</relativePath>
21+
<relativePath>../pom.xml</relativePath>
2222
</parent>
23-
<dependencies>
24-
<dependency>
25-
<groupId>org.apache.cloudstack</groupId>
26-
<artifactId>cloud-client-ui</artifactId>
27-
<version>${project.version}</version>
28-
<type>war</type>
29-
</dependency>
30-
</dependencies>
3123
<properties>
3224
<client.config.base>../../client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/</client.config.base>
3325
<client.config.jars>${client.config.base}/lib</client.config.jars>

tools/cli/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2121
<modelVersion>4.0.0</modelVersion>
2222
<artifactId>cloud-cli</artifactId>
23-
<name>Apache CloudStack Developer Tools: cloudmonkey cli</name>
23+
<name>Apache CloudStack cloudmonkey cli</name>
2424
<packaging>pom</packaging>
2525
<parent>
2626
<groupId>org.apache.cloudstack</groupId>
2727
<artifactId>cloudstack</artifactId>
2828
<version>4.1.0-SNAPSHOT</version>
29-
<relativePath>../../pom.xml</relativePath>
29+
<relativePath>../pom.xml</relativePath>
3030
</parent>
3131

3232
<build>

tools/devcloud-kvm/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<groupId>org.apache.cloudstack</groupId>
1919
<artifactId>cloudstack</artifactId>
2020
<version>4.1.0-SNAPSHOT</version>
21-
<relativePath>../../pom.xml</relativePath>
21+
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<dependencies>
2424
<dependency>

tools/devcloud/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<groupId>org.apache.cloudstack</groupId>
1919
<artifactId>cloudstack</artifactId>
2020
<version>4.1.0-SNAPSHOT</version>
21-
<relativePath>../../pom.xml</relativePath>
21+
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<dependencies>
2424
<dependency>

tools/marvin/marvin/deployDataCenter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
import configGenerator
2020
import cloudstackException
2121
import cloudstackTestClient
22-
import sys
23-
import os
2422
import logging
2523
from cloudstackAPI import *
24+
from os import path
2625
from optparse import OptionParser
2726

2827
class deployDataCenters():
2928

3029
def __init__(self, cfgFile):
31-
if not os.path.exists(cfgFile):
30+
if not path.exists(cfgFile) \
31+
and not path.exists(path.abspath(cfgFile)):
3232
raise IOError("config file %s not found. please specify a valid config file"%cfgFile)
3333
self.configFile = cfgFile
3434

@@ -444,7 +444,7 @@ def deploy(self):
444444

445445
parser = OptionParser()
446446

447-
parser.add_option("-i", "--intput", action="store", \
447+
parser.add_option("-i", "--input", action="store", \
448448
default="./datacenterCfg", dest="input", help="the path \
449449
where the json config file generated, by default is \
450450
./datacenterCfg")

0 commit comments

Comments
 (0)