<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~
  ~ Copyright 2016 The Symphony Software Foundation
  ~
  ~ Licensed to The Symphony Software Foundation (SSF) 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">
    <parent>
        <artifactId>symphony-java-client</artifactId>
        <groupId>org.symphonyoss.symphony</groupId>
        <version>1.0.2</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>symphony-client</artifactId>
    <name>Symphony Client</name>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <jsoup-version>1.9.2</jsoup-version>
        <symphony-api-version>1.46.0</symphony-api-version>
        <gson-version>2.7</gson-version>
        <failsafe.jvm.args>-Dlog4j.configurationFile=src/test/resources/log4j.properties -Xmx1024m
            -Dsessionauth.url=${env.SESSIONAUTH_URL} -Dkeyauth.url=${env.KEYAUTH_URL}
            -Dsymphony.agent.pod.url=${env.POD_URL} -Dsymphony.agent.agent.url=${env.AGENT_URL}
            -Dtruststore.file=${env.TRUSTSTORE_FILE} -Dtruststore.password=${env.TRUSTSTORE_PASSWORD}
            -Dbot.user.cert.file=${env.BOT_USER_CERT_FILE} -Dbot.user.cert.password=${env.BOT_USER_CERT_PASSWORD}
            -Dbot.user.email=${env.BOT_USER_EMAIL} -Dsender.user.email=${env.SENDER_USER_EMAIL}
            -Dsender.user.cert.file=${env.SENDER_USER_CERT_FILE}
            -Dsender.user.cert.password=${env.SENDER_USER_CERT_PASSWORD} -Dtest.room.stream=${env.TEST_ROOM_STREAM}
            -Dmp.user.email=${env.MP_USER_EMAIL}

        </failsafe.jvm.args>
        <jvm.args>-Xmx1024m -Dsessionauth.url=$SESSIONAUTH_URL -Dkeyauth.url=$KEYAUTH_URL -Dpod.url=$POD_URL
            -Dagent.url=$AGENT_URL -Dtruststore.file=$TRUSTSTORE_FILE -Dtruststore.password=$TRUSTSTORE_PASSWORD
            -Dbot.user.cert.file=$BOT_USER_CERT_FILE -Dbot.user.cert.password=$BOT_USER_CERT_PASSWORD
            -Dbot.user.email=$BOT_USER_EMAIL -Dsender.user.email=$SENDER_USER_EMAIL
            -Dreceiver.user.email=$RECEIVER_USER_EMAIL -Drss.url=$RSS_URL -Drss.limit=$RSS_LIMIT
        </jvm.args>

    </properties>

    <dependencies>
        <dependency>
            <groupId>org.symphonyoss.symphony</groupId>
            <artifactId>symphony-authenticator-java-jersey2-client</artifactId>
            <version>${symphony-api-version}</version>
        </dependency>
        <dependency>
            <groupId>org.symphonyoss.symphony</groupId>
            <artifactId>symphony-agent-java-jersey2-client</artifactId>
            <version>${symphony-api-version}</version>
        </dependency>
        <dependency>
            <groupId>org.symphonyoss.symphony</groupId>
            <artifactId>symphony-pod-java-jersey2-client</artifactId>
            <version>${symphony-api-version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson-version}</version>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>SymphonyTest</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>org.symphonyoss.client.SymphonyClient</mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>

    </build>
    <profiles>
        <profile>
            <id>integration-testing</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.19.1</version>
                        <configuration>
                            <argLine>${failsafe.jvm.args}</argLine>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>