<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.httpclient</groupId>
        <artifactId>atlassian-httpclient-parent</artifactId>
        <version>0.17.0-m05-ACDEV-250</version>
    </parent>

    <artifactId>atlassian-httpclient-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Atlassian HTTP Client, Apache HTTP components impl</name>
    <description>Implementation of the HTTP Client API based on Apache HTTP Components</description>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <httpclient.api.version>0.17</httpclient.api.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.httpclient</groupId>
            <artifactId>atlassian-httpclient-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Host provided dependencies -->
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <version>${atlassian-plugins.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Http client -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpasyncclient-cache</artifactId>
            <version>${httpasyncclient.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <version>4.2.1-atlassian-2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpasyncclient</artifactId>
            <version>${httpasyncclient.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore-nio</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Remove httpcore 4.2.2 and httpcore-nio 4.2.2 from here
            once there is a new release of httpasyncclient above 4.0-beta2 that includes them
        -->
        <!-- We need httpcore 4.2.2 to fix https://issues.apache.org/jira/browse/HTTPCORE-309 -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${httpcore.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore-nio</artifactId>
            <version>${httpcore.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.1.2</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>com.atlassian.junit</groupId>
            <artifactId>atlassian-junit</artifactId>
            <version>0.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-server</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlet</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>7.6.8.v20121106</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>7.6.8.v20121106</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <configuration>
                    <extractDependencies>true</extractDependencies>
                    <instructions>
                        <Import-Package>
                            com.atlassian.sal.api*;version="${sal.version}",
                            com.atlassian.util.concurrent*;version="${atlassian-util-concurrent-api.version}",
                            com.google.common*;version="${guava.version}",
                            javax.net.ssl,
                            javax.servlet.*,
                            org.osgi*,
                            org.slf4j*;version="1.5",
                            org.springframework*,
                            org.xml.sax*,
                            *;resolution:=optional
                        </Import-Package>
                        <Export-Package>
                            com.atlassian.httpclient.api*;version="${httpclient.api.version}"
                        </Export-Package>
                        <Spring-Context>*;timeout:=60</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
