blob: 85b2293919f6aa72b4ff658202436afe8395ba15 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
# 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.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
<version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.cli</artifactId>
<packaging>jar</packaging>
<name>Apache Stratos - CLI</name>
<description>Apache Stratos CLI</description>
<dependencies>
<!-- Adding HttpClient dependencies. Those were resolved with above one -->
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.securevault</groupId>
<artifactId>org.wso2.securevault</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
<artifactId>org.apache.stratos.manager.service.stub</artifactId>
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
<artifactId>org.apache.stratos.common</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
<artifactId>org.apache.stratos.manager</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Copy the CLI -->
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${maven.output.build.path}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<classifier>standalone</classifier>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${maven.output.build.path}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Integration testing the CLI -->
<profile>
<id>cli-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/downloads/"/>
<get src="https://pypi.python.org/packages/source/p/pexpect/pexpect-3.2.tar.gz"
dest="${project.build.directory}/downloads/"
verbose="true"/>
<gunzip src="${project.build.directory}/downloads/pexpect-3.2.tar.gz"
dest="${project.build.directory}/downloads/pexpect-3.2.tar"/>
<untar src="${project.build.directory}/downloads/pexpect-3.2.tar"
dest="${project.build.directory}/"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<executable>python</executable>
<workingDirectory>src/test/python</workingDirectory>
<!-- tests common to both interactive and non-interactive use cases -->
<arguments>
<argument>test_common.py</argument>
</arguments>
<environmentVariables>
<PYTHONPATH>
../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH
</PYTHONPATH>
<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
<WIREMOCK_JAR>
${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar
</WIREMOCK_JAR>
<!-- Use uncommon ports to prevent conflict on jenkins -->
<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
</environmentVariables>
</configuration>
<id>python-test-common</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<configuration>
<executable>python</executable>
<workingDirectory>src/test/python</workingDirectory>
<!-- interactive use cases -->
<arguments>
<argument>test_interactive.py</argument>
</arguments>
<environmentVariables>
<PYTHONPATH>
../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH
</PYTHONPATH>
<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
<WIREMOCK_JAR>
${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar
</WIREMOCK_JAR>
<!-- Use uncommon ports to prevent conflict on jenkins -->
<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
</environmentVariables>
</configuration>
<id>python-test-interactive</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<configuration>
<executable>python</executable>
<workingDirectory>src/test/python</workingDirectory>
<!-- non-interactive use cases -->
<arguments>
<argument>test_noninteractive.py</argument>
</arguments>
<environmentVariables>
<PYTHONPATH>
../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH
</PYTHONPATH>
<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
<WIREMOCK_JAR>
${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar
</WIREMOCK_JAR>
<!-- Use uncommon ports to prevent conflict on jenkins -->
<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
</environmentVariables>
</configuration>
<id>python-test-noninteractive</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>