| <!-- 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-marvin</artifactId> |
| <name>Apache CloudStack marvin</name> |
| <packaging>pom</packaging> |
| <parent> |
| <groupId>org.apache.cloudstack</groupId> |
| <artifactId>cloud-tools</artifactId> |
| <version>4.9.3.0</version> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.cloudstack</groupId> |
| <artifactId>cloud-apidoc</artifactId> |
| <version>${project.version}</version> |
| <type>pom</type> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <defaultGoal>install</defaultGoal> |
| <plugins> |
| <plugin> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>clean</id> |
| <phase>clean</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <delete dir="marvin/cloudstackAPI" /> |
| <echo>Deleting ${project.artifactId} API sources</echo> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2.1</version> |
| <executions> |
| <execution> |
| <id>generate-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <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> |
| <execution> |
| <id>package</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${exec.workingdir}</workingDirectory> |
| <executable>python</executable> |
| <arguments> |
| <argument>mvn-setup.py</argument> |
| <argument>${project.version}</argument> |
| <argument>sdist</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <!-- Custom profiles for sync and integration tests --> |
| <profiles> |
| <profile> |
| <id>marvin.sync</id> |
| <activation> |
| <property> |
| <name>endpoint</name> |
| <value>localhost</value> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2.1</version> |
| <executions> |
| <execution> |
| <id>generate-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${basedir}/marvin</workingDirectory> |
| <executable>python</executable> |
| <arguments> |
| <argument>codegenerator.py</argument> |
| <argument>-e</argument> |
| <argument>${endpoint}</argument> |
| <echo>Generating ${project.artifactId} API classes}</echo> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>package</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${exec.workingdir}</workingDirectory> |
| <executable>python</executable> |
| <arguments> |
| <argument>mvn-setup.py</argument> |
| <argument>${project.version}</argument> |
| <argument>sdist</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>install</id> |
| <phase>install</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${basedir}/dist</workingDirectory> |
| <executable>pip</executable> |
| <arguments> |
| <argument>install</argument> |
| <argument>--allow-external</argument> |
| <argument>--upgrade</argument> |
| <argument>Marvin-${project.version}.tar.gz</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>marvin.setup</id> |
| <properties> |
| <marvin.config>${user.dir}/setup/dev/advanced.cfg</marvin.config> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.gmaven</groupId> |
| <artifactId>gmaven-plugin</artifactId> |
| <version>1.5</version> |
| <executions> |
| <execution> |
| <id>setproperty</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <source> |
| pom.properties['resolved.basedir']=project.basedir.absolutePath.replace('\','/').replace('D:','/cyg/d'); |
| pom.properties['resolved.userdir']='${user.dir}'.replace('\','/').replace('D:','/cyg/d'); |
| </source> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2.1</version> |
| <executions> |
| <execution> |
| <id>pre-integration-test</id> |
| <phase>pre-integration-test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${basedir}/marvin</workingDirectory> |
| <executable>python</executable> |
| <arguments> |
| <argument>deployAndRun.py</argument> |
| <argument>-c</argument> |
| <argument>${resolved.userdir}/${marvin.config}</argument> |
| <argument>-d</argument> |
| <argument>${resolved.basedir}/marvin/testSetupSuccess.py</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>marvin.test</id> |
| <properties> |
| <tag>simulator</tag> |
| <test>test/integration/smoke</test> |
| <marvin.config>${user.dir}/setup/dev/advanced.cfg</marvin.config> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.gmaven</groupId> |
| <artifactId>gmaven-plugin</artifactId> |
| <version>1.5</version> |
| <executions> |
| <execution> |
| <id>setproperty</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <properties> |
| <resolved.user.dir>${user.dir}</resolved.user.dir> |
| <resolved.marvin.config>${marvin.config}</resolved.marvin.config> |
| </properties> |
| <source> |
| project.properties['resolved.user.dir']='${user.dir}'.replace('\','/').replace('D:','/cyg/d'); |
| project.properties['resolved.marvin.config']='${marvin.config}'.replace('\','/').replace('D:','/cyg/d'); |
| </source> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2.1</version> |
| <executions> |
| <execution> |
| <id>integration-test</id> |
| <phase>integration-test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${basedir}/marvin</workingDirectory> |
| <executable>nosetests</executable> |
| <arguments> |
| <argument>--with-marvin</argument> |
| <argument>--marvin-config</argument> |
| <argument>${resolved.user.dir}/${resolved.marvin.config}</argument> |
| <argument>--load</argument> |
| <argument>-a</argument> |
| <argument>tags=${tag}</argument> |
| <argument>${resolved.user.dir}/${test}</argument> |
| <argument>-v</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |