<?xml version="1.0" encoding="UTF-8"?>
<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>
    <parent>
        <groupId>io.streamzi.cloudevent-flow</groupId>
        <artifactId>parent</artifactId>
        <version>0.0.3</version>
    </parent>

    <name>cloudevent-flow-${project.artifactId}</name>
    <artifactId>manager</artifactId>
    <packaging>war</packaging>


    <properties>
        <version.thorntail>2.1.0.Final</version.thorntail>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.thorntail</groupId>
                <artifactId>bom-all</artifactId>
                <version>${version.thorntail}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Java EE 7 dependency -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Thorntail Fractions -->
        <dependency>
            <groupId>io.thorntail</groupId>
            <artifactId>microprofile</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>config-api-runtime</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.thorntail</groupId>
            <artifactId>ejb</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>config-api-runtime</artifactId>
                </exclusion>
            </exclusions>            
        </dependency>

        <dependency>
            <groupId>io.streamzi.cloudevent-flow</groupId>
            <artifactId>model</artifactId>
            <version>${project.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.18</version>
        </dependency>        
        
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>

        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>openshift-client</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>flow-manager</finalName>
        <plugins>
            <plugin>
                <groupId>io.thorntail</groupId>
                <artifactId>thorntail-maven-plugin</artifactId>
                <version>${version.thorntail}</version>

                <executions>
                    <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <properties>
                        <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                    </properties>
                </configuration>
            </plugin>

            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.26.1</version>

                <configuration>
                    <images>
                        <image>
                            <alias>manager</alias>
                            <name>docker.io/streamzi/cef-manager</name>
                            <build>
                                <dockerFileDir>${project.basedir}</dockerFileDir>
                            </build>
                        </image>
                    </images>
                </configuration>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <id>build</id>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>