<?xml version="1.0" encoding="utf-8" ?>
<!--
  ~ Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. 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/maven-v4_0_0.xsd">
    <parent>
        <groupId>org.wso2.carbon.analytics</groupId>
        <artifactId>org.wso2.carbon.analytics.parent</artifactId>
        <version>2.0.329</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.data.provider</artifactId>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - Data Provider Module</name>
    <description>
        Used to provide data for different clients from different sources according to the requirement
    </description>
    <url>http://wso2.org</url>

    <dependencies>
        <!--OSGi-->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.eclipse.osgi</groupId>
            <artifactId>org.eclipse.osgi.services</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>

        <!--Logging-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <!--MSF4J-->
        <dependency>
            <groupId>org.wso2.msf4j</groupId>
            <artifactId>msf4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.websocket</groupId>
            <artifactId>javax.websocket-api</artifactId>
        </dependency>

        <!--UI Server-->
        <dependency>
            <groupId>org.wso2.carbon.uiserver</groupId>
            <artifactId>org.wso2.carbon.uiserver</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.datasources</groupId>
            <artifactId>org.wso2.carbon.datasource.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.config</groupId>
            <artifactId>org.wso2.carbon.config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics-common</groupId>
            <artifactId>org.wso2.carbon.database.query.manager</artifactId>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics</groupId>
            <artifactId>org.wso2.carbon.analytics.msf4j.interceptor.common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <maven.findbugsplugin.version.exclude>findbugs-exclude.xml</maven.findbugsplugin.version.exclude>
        <private.package>
            org.wso2.carbon.database.query.manager.*,
            org.wso2.carbon.database.query.manager.config.*,
            org.wso2.carbon.database.query.manager.exception.*
        </private.package>
        <export.package>
            org.wso2.carbon.data.provider.*,
        </export.package>
        <import.package>
            org.yaml.snakeyaml.*;version="${org.snakeyaml.import.version.range}",
            org.osgi.framework.*;version="${osgi.framework.import.version.range}",
            org.wso2.carbon.datasource.core.*;version="${org.wso2.carbon.datasource.version.range}",
            org.wso2.carbon.config.provider.*;version="${carbon.config.version.range}",
            org.wso2.carbon.config.*;version="${carbon.config.version.range}",
            org.wso2.msf4j.*;version="${msf4j.import.version.range}",
            javax.ws.rs.*;version="${javax.ws.rs.version.range}",
            javax.websocket.*;version="${javax.websocket.version.range}",
            org.wso2.carbon.uiserver.api.*; version="${carbon.uiserver.version.range}",
            org.wso2.carbon.uiserver.spi.*; version="${carbon.uiserver.version.range}",
            org.slf4j.*;version="${slf4j.version.range}",
            com.google.gson.*; version="${gson.version.range}",
            org.wso2.siddhi.*;version="${siddhi.version.range}",
            org.wso2.siddhi.annotation.*;version="${siddhi.version.range}",
            org.wso2.siddhi.query.*;version="${siddhi.version.range}",
            *;resolution:=optional
        </import.package>
        <carbon.component>
            osgi.service; objectClass="org.wso2.msf4j.websocket.WebSocketEndpoint",
            osgi.service; objectClass="org.wso2.carbon.uiserver.spi.RestApiProvider",
            osgi.service; objectClass="org.wso2.carbon.data.provider.DataProvider";serviceCount="2"
        </carbon.component>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>data-provider-all</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.5.0</version>
                        <executions>
                            <execution>
                                <id>run-h2</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>mvn</executable>
                                    <arguments>
                                        <argument>verify</argument>
                                        <argument>-P data-provider-h2</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>run-mysql</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>mvn</executable>
                                    <arguments>
                                        <argument>verify</argument>
                                        <argument>-P data-provider-mysql</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>run-postgres</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>mvn</executable>
                                    <arguments>
                                        <argument>verify</argument>
                                        <argument>-P data-provider-postgres</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>run-oracle</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>mvn</executable>
                                    <arguments>
                                        <argument>verify</argument>
                                        <argument>-P data-provider-oracle</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>run-mssql</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>mvn</executable>
                                    <arguments>
                                        <argument>verify</argument>
                                        <argument>-P data-provider-mssql</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <!--<execution>-->
                            <!--<id>run-db2</id>-->
                            <!--<phase>integration-test</phase>-->
                            <!--<goals>-->
                            <!--<goal>exec</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                            <!--<executable>mvn</executable>-->
                            <!--<arguments>-->
                            <!--<argument>verify</argument>-->
                            <!--<argument>-P data-provider-db2</argument>-->
                            <!--</arguments>-->
                            <!--</configuration>-->
                            <!--</execution>-->
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-h2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jacoco-initialize</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <destFile>${basedir}/target/coverage-reports/jacoco.exec</destFile>
                                    <propertyName>jcoverage.command</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>jacoco-site</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${basedir}/target/coverage-reports/jacoco.exec</dataFile>
                                    <outputDirectory>${basedir}/target/coverage-reports/</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-h2</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-h2</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <argLine>${jcoverage.command}</argLine>
                            <environmentVariables>
                                <DATABASE_TYPE>H2</DATABASE_TYPE>
                            </environmentVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-mysql</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-docker-for-mysql</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-docker-for-mysql</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>remove</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <images>
                                <image>
                                    <alias>data-provider-mysql</alias>
                                    <name>mysql:5.7</name>
                                    <run>
                                        <namingStrategy>alias</namingStrategy>
                                        <env>
                                            <MYSQL_DATABASE>dasdb</MYSQL_DATABASE>
                                            <MYSQL_ROOT_PASSWORD>root</MYSQL_ROOT_PASSWORD>
                                        </env>
                                        <ports>
                                            <port>${data-provider-mysql.port}:3306</port>
                                        </ports>
                                        <wait>
                                            <tcp>
                                                <ports>
                                                    <port>3306</port>
                                                </ports>
                                            </tcp>
                                            <time>60000</time>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-mysql</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-mysql</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <environmentVariables>
                                <DATABASE_TYPE>MySQL</DATABASE_TYPE>
                                <DATABASE_USER>root</DATABASE_USER>
                                <DATABASE_PASSWORD>root</DATABASE_PASSWORD>
                                <PORT>${data-provider-mysql.port}</PORT>
                                <DOCKER_HOST_IP>${docker.container.data-provider-mysql.ip}</DOCKER_HOST_IP>
                            </environmentVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-postgres</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-docker-for-postgres</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-docker-for-postgres</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>remove</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <images>
                                <image>
                                    <alias>data-provider-postgres</alias>
                                    <name>postgres:9.6</name>
                                    <run>
                                        <namingStrategy>alias</namingStrategy>
                                        <env>
                                            <POSTGRES_PASSWORD>root</POSTGRES_PASSWORD>
                                            <POSTGRES_USER>root</POSTGRES_USER>
                                            <POSTGRES_DB>dasdb</POSTGRES_DB>
                                        </env>
                                        <ports>
                                            <port>${data-provider-postgres.port}:5432</port>
                                        </ports>
                                        <wait>
                                            <tcp>
                                                <ports>
                                                    <port>5432</port>
                                                </ports>
                                            </tcp>
                                            <time>60000</time>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-postgres</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-postgres</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <environmentVariables>
                                <DATABASE_TYPE>POSTGRES</DATABASE_TYPE>
                                <DATABASE_USER>root</DATABASE_USER>
                                <DATABASE_PASSWORD>root</DATABASE_PASSWORD>
                                <PORT>${data-provider-postgres.port}</PORT>
                                <DOCKER_HOST_IP>${docker.container.data-provider-postgres.ip}</DOCKER_HOST_IP>
                            </environmentVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-mssql</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-docker-for-mssql</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-docker-for-mssql</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>remove</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <images>
                                <image>
                                    <name>microsoft/mssql-server-linux:2017-GA</name>
                                    <alias>data-provider-mssql</alias>
                                    <run>
                                        <namingStrategy>alias</namingStrategy>
                                        <volumes>
                                            <bind>
                                                <volume>mssql_server_data:/var/opt/mssql/data</volume>
                                            </bind>
                                        </volumes>
                                        <env>
                                            <ACCEPT_EULA>Y</ACCEPT_EULA>
                                            <SA_PASSWORD>wso2das123#</SA_PASSWORD>
                                        </env>
                                        <ports>
                                            <port>${data-provider-mssql.port}:1433</port>
                                        </ports>
                                        <wait>
                                            <log>Service Broker manager has started.</log>
                                            <time>120000</time>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-mssql</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-mssql</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <environmentVariables>
                                <DATABASE_TYPE>MSSQL</DATABASE_TYPE>
                                <DATABASE_USER>sa</DATABASE_USER>
                                <DATABASE_PASSWORD>wso2das123#</DATABASE_PASSWORD>
                                <PORT>${data-provider-mssql.port}</PORT>
                                <DOCKER_HOST_IP>${docker.container.data-provider-mssql.ip}</DOCKER_HOST_IP>
                            </environmentVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-oracle</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-docker-for-oracle</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-docker-for-oracle</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>remove</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <images>
                                <image>
                                    <alias>data-provider-oracle</alias>
                                    <name>dockerhub.private.wso2.com/sajithd-oracle-database:11.2.0.2-xe</name>
                                    <run>
                                        <namingStrategy>alias</namingStrategy>
                                        <env>
                                            <ORACLE_PWD>root</ORACLE_PWD>
                                        </env>
                                        <ports>
                                            <port>${data-provider-oracle.port}:1521</port>
                                        </ports>
                                        <wait>
                                            <log>DATABASE IS READY TO USE!</log>
                                            <time>400000</time>
                                        </wait>
                                        <shmSize>2718281829</shmSize>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-oracle</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-oracle</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <environmentVariables>
                                <DATABASE_TYPE>ORACLE</DATABASE_TYPE>
                                <DATABASE_USER>system</DATABASE_USER>
                                <DATABASE_PASSWORD>root</DATABASE_PASSWORD>
                                <PORT>${data-provider-oracle.port}</PORT>
                                <DOCKER_HOST_IP>${docker.container.data-provider-oracle.ip}</DOCKER_HOST_IP>
                            </environmentVariables>
                            <argLine>-Duser.timezone=GMT</argLine>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>data-provider-db2</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-docker-for-db2</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-docker-for-db2</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>remove</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <images>
                                <image>
                                    <alias>data-provider-db2</alias>
                                    <name>dockerhub.private.wso2.com/sajithd-db2-database:latest</name>
                                    <run>
                                        <namingStrategy>alias</namingStrategy>
                                        <env>
                                            <DB2INST1_PASSWORD>db2inst1-pwd</DB2INST1_PASSWORD>
                                            <LICENSE>accept</LICENSE>
                                        </env>
                                        <cmd>
                                            <shell>su - db2inst1</shell>
                                            <shell>db2start</shell>
                                        </cmd>
                                        <ports>
                                            <port>${data-provider-db2.port}:50000</port>
                                        </ports>
                                        <wait>
                                            <log>SQL1063N DB2START processing was successful.</log>
                                            <time>10000</time>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>integration-test-for-db2</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify-for-db2</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <environmentVariables>
                                <DATABASE_TYPE>DB2</DATABASE_TYPE>
                                <DATABASE_USER>db2inst1</DATABASE_USER>
                                <DATABASE_PASSWORD>db2inst1-pwd</DATABASE_PASSWORD>
                                <PORT>${data-provider-db2.port}</PORT>
                                <DOCKER_HOST_IP>${docker.container.data-provider-db2.ip}</DOCKER_HOST_IP>
                            </environmentVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
