<?xml version="1.0"?>
<!--
  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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.cxf.samples</groupId>
        <artifactId>cxf-samples</artifactId>
        <version>4.1.0-SNAPSHOT</version>
        <relativePath>../..</relativePath>
    </parent>

    <artifactId>cxf-benchmark-jaxrs-basic-https</artifactId>
    <name>JAX-RS Basic With HTTPS communications</name>
    <description>Apache CXF Benchmark JAX-RS Basic HTTPS communications</description>
    <url>https://cxf.apache.org</url>

    <profiles>
        <profile>
            <id>server</id>
            <properties>
                <host>localhost</host>
                <protocol>https</protocol>
            </properties>
            <build>
                <defaultGoal>test</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <mainClass>org.apache.cxf.performance.https.server.Server</mainClass>
                                    <arguments>
                                        <argument>-host</argument>
                                        <argument>${host}</argument>
                                        <argument>-protocol</argument>
                                        <argument>${protocol}</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>client</id>
            <properties>
                <host>localhost</host>
                <protocol>https</protocol>
                <operation>get</operation>
                <threads>4</threads>
                <time>30</time>
            </properties>
            <build>
                <defaultGoal>test</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <mainClass>org.apache.cxf.performance.https.client.Client</mainClass>
                                    <arguments>
                                        <argument>-host</argument>
                                        <argument>${host}</argument>
                                        <argument>-protocol</argument>
                                        <argument>${protocol}</argument>
                                        <argument>-Operation</argument>
                                        <argument>${operation}</argument>
                                        <argument>-Threads</argument>
                                        <argument>${threads}</argument>
                                        <argument>-Amount</argument>
                                        <argument>${time}</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>clientserver</id>
            <properties>
                <operation>get</operation>
                <threads>4</threads>
                <time>30</time>
            </properties>
            <build>
                <defaultGoal>test</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <classpathScope>test</classpathScope>
                                    <mainClass>org.apache.cxf.performance.https.client.Client</mainClass>
                                    <arguments>
                                        <argument>-Operation</argument>
                                        <argument>${operation}</argument>
                                        <argument>-Threads</argument>
                                        <argument>${threads}</argument>
                                        <argument>-Amount</argument>
                                        <argument>${time}</argument>
                                        <argument>-Server</argument>
                                        <argument>-nowait</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>org.apache.cxf.samples</groupId>
            <artifactId>cxf-benchmark-base</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${cxf.httpcomponents.client.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
    </dependencies>
</project>
