<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.elastisys.scale</groupId>
    <artifactId>cloudpool.root</artifactId>
    <version>5.1.0</version>
  </parent>
  <artifactId>cloudpool.openstack</artifactId>
  <packaging>jar</packaging>
  <name>elastisys:scale :: cloudpool :: openstack</name>
  <description>
    A cloud pool capable of managing a pool of OpenStack servers.
    This build module produces an all-in-one "server and application" executable
    jar file. When executed, it starts an embedded web server that publishes 
    the cloud pool REST API endpoint.
  </description>

  <properties>
    <docker.image>elastisys/openstackpool</docker.image>
    <shade.mainClass>com.elastisys.scale.cloudpool.openstack.server.Main</shade.mainClass>
  </properties>

  <dependencies>
    <!-- Openstack API access -->
    <dependency>
      <groupId>com.elastisys.scale</groupId>
      <artifactId>commons.openstack</artifactId>
    </dependency>

    <!-- Common cloud pool API/server classes -->
    <dependency>
      <groupId>com.elastisys.scale</groupId>
      <artifactId>cloudpool.api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <!-- MultiCloudPool API/server classes -->
    <dependency>
      <groupId>com.elastisys.scale</groupId>
      <artifactId>cloudpool.multipool</artifactId>
      <version>${project.version}</version>
    </dependency>    
    <!-- Common cloud pool functionality -->
    <dependency>
      <groupId>com.elastisys.scale</groupId>
      <artifactId>cloudpool.commons</artifactId>
      <version>${project.version}</version>
    </dependency>    
    

    <!-- UTC Time -->
    <dependency>
      <groupId>com.elastisys.scale</groupId>
      <artifactId>commons.util</artifactId>
    </dependency>

    <!-- Logging -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build> 
    <plugins>
      <!-- Build a standalone executable jar file that embeds all classpath dependencies. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
      </plugin>

      <!-- Builds a Docker image -->
      <plugin>
	<groupId>com.spotify</groupId>
	<artifactId>docker-maven-plugin</artifactId>
      </plugin>
      
    </plugins>
  </build>

</project>
